Animation

Animation

Methods


animation_destroy(object)

Parameters:
Name Type Description
object

object to destroy the animations of

Code Equivalent:
object.animations.destroy();

animation_next(framecount, objet)


Increases the animation by the given number of frames.

Check out the third party documentation for a more in depth explanation.

Parameters:
Name Type Description
framecount Number

number of frames to advance

objet

object with the animation to change

Code Equivalent:
object.animations.next(framecount);

animation_next(framecount, objet)


Moves the animation backwards by the given number of frames.

Check out the third party documentation for a more in depth explanation.

Parameters:
Name Type Description
framecount Number

number of frames to move back

objet

object with the animation to change

Code Equivalent:
object.animations.next(framecount);

Blockly.JavaScript['animation_destroy'](block)

Parameters:
Name Type Description
block
Code Equivalent:
undefined

Blockly.JavaScript['animation_next'](block)

Parameters:
Name Type Description
block
Code Equivalent:
undefined

Blockly.JavaScript['animation_previous'](block)

Parameters:
Name Type Description
block
Code Equivalent:
undefined

Blockly.JavaScript['validate_frames'](block)

Parameters:
Name Type Description
block

Code Equivalent:
undefined

get_animation_boolean_field(field, object)


Returns the chosen boolean field value of the object.

Check out the third party documentation for a more in depth explanation.

Parameters:
Name Type Description
field

the value to get

object

object to get values from

Code Equivalent:
object.animations.currentAnim.field = value;

get_animation_numeric_field(field, object)


Returns the chosen numeric field value of the object.

Check out the third party documentation for a more in depth explanation.

Parameters:
Name Type Description
field

the value to get

object

object to get values from

Code Equivalent:
object.animations.currentAnim.field = value;

get_animation_string_field(field, object)


Returns the chosen string field value of the object.

Check out the third party documentation for a more in depth explanation.

Parameters:
Name Type Description
field

the value to get

object

object to get values from

Code Equivalent:
object.animations.currentAnim.field

play_animation(animation, object)


Plays an existing animation based on the given tag.

Check out the third party documentation for a more in depth explanation.

Parameters:
Name Type Description
animation String

the name of the animation to play

object

object to play the animation on

Code Equivalent:
object.animations.play(animation);

set_animation_boolean_field(field, object, value)


Assigns the chosen boolean field for the object.

Check out the third party documentation for a more in depth explanation.

Parameters:
Name Type Description
field

the value to set

object

object to assign values for

value

value to set the field to

Code Equivalent:
object.animations.field = newProperty;

set_animation_numeric_field(field, object, value)


Assigns the chosen numeric field for the object.

Check out the third party documentation for a more in depth explanation.

Parameters:
Name Type Description
field

the value to set

object

object to assign values for

value

value to set the field to

Code Equivalent:
object.animations.field = newProperty;

set_animation_string_field(field, object, value)


Assigns the chosen string field for the object.

Check out the third party documentation for a more in depth explanation.

Parameters:
Name Type Description
field

the value to set

object

object to assign values for

value

value to set the field to

Code Equivalent:
object.animations.currentAnim.field = value;

set_frame(object, frameNumber)


Sets the frame for the current animation on the object.

Check out the third party documentation for a more in depth explanation.

Parameters:
Name Type Description
object

object to set the animation frame for

frameNumber Number

frame to set the animation to

Code Equivalent:
object.frame = frameNumber;

stop_animation(object)

Parameters:
Name Type Description
object

object to stop the animations on

Code Equivalent:
object.animations.stop();

validate_frames(object, frames)


Checks if the given frames are valid and exist in the object's animation.

Check out the third party documentation for a more in depth explanation.

Parameters:
Name Type Description
object

object to check the animation of

frames Array

frames to check

Code Equivalent:
object.animations.validateFrames(frames, true)