Classes

Concepts

Libraries

advertisement »

ambientSounds »

bitser »

contentPoints »

eventBoxText »

factValidity »

frameBuffer »

officeBuildingInserter »

priorityRenderer »

randomEvents »

scaling »

spritesheetParser »

statusIcons »

test3 »

util »

Objects

attemptPickOffset

Description

Called every frame when drawing the object.

Arguments

1 carryObjectData data

the carry object data.

2 table offsets

the offset table for every frame. This is the 'offsets' table of the carryObjectData object.

3 animationInstance object

the animation object tied to this carry object.

4 string animName

the animation.

Example

-- taken from game/developer/avatar.lua


	local carryData = owner.carryObjectData
	
	if carryData then
		local offX, offY = carryObjects:attemptPickOffset(owner.carryObjectData, owner.carryOffsets, self.animations[self.curAnims[1]], self.animationName)
		
		if offX then
			self:drawProp(carryData.id, x, y, rot, 1, 1, offX, offY)
		end
	end