Classes

Concepts

Libraries

advertisement »

ambientSounds »

bitser »

contentPoints »

eventBoxText »

factValidity »

frameBuffer »

officeBuildingInserter »

priorityRenderer »

randomEvents »

scaling »

spritesheetParser »

statusIcons »

test3 »

util »

Objects

registerNewAnimation

Description

Registers a new animation.

Arguments

1 string name

the animation name.


Notice: Undefined offset: 2 in /var/www/vhosts/gamedevstudiogame.com/httpdocs/templates/method_view.phtml on line 12

2 table the frame data.

Example

register.newAnimation(hairAnim, {
	halfOriginOffset = true, -- whether the quad should be from the center by half when rendering, this is useful when keeping the sprites in the same position regardless of the rotation.

	
	{
quad = quadLoader:load("employee_walk_hair_1"),  -- the quad to draw, this must be a valid quad on the provided texture that the spritebatch uses

frame = "worker_hair", --the spritebatch name, if none is defined on frame data after the first one, it will use the one on the first index (aka this one)

originOffset = {0, -1}, -- origin offset

offset = {0, 0}, -- overall offset

},
})