Class GroupAnimationHolder
Display animation from artwork sheet
Implements
Methods
BeforeUpdate()
[2/4] This function is called every frame when entity is in stage. Prioritize using this function to update physics logic.
Declaration
public override sealed void BeforeUpdate()
Overrides
Follow(Entity)
Makes the holder follow the target all the time
Declaration
public void Follow(Entity target)
LateUpdate()
[4/4] This function is called every frame when entity is in stage. Prioritize using this function to render the entity.
Declaration
public override void LateUpdate()
Overrides
OnActivated()
This function is called when entity enter the stage
Declaration
public override void OnActivated()
Overrides
Spawn(int, int, int, int, int, int, int)
Create a new animation to the stage
Declaration
public static GroupAnimationHolder Spawn(int groupID, int x, int y, int renderLayer = 3, int rotation1000 = 0, int rotationSpeed = 0, int scale = 1000)
Parameters
Type | Name | Description |
---|---|---|
int | groupID | Artwork sprite group ID |
int | x | Position X in global space |
int | y | Position Y in global space |
int | renderLayer | Which rendering layer does it renders into |
int | rotation1000 | Initialize rotation (0 means 0°, 1000 means 1°) |
int | rotationSpeed | Speed of the rotation (0 means 0°, 1 means 1°) |
Returns
Type | Description |
---|---|
GroupAnimationHolder | Instance of the holder |
Spawn(int, int, int, int, int, int, int, bool, Color32, int, int)
Create a new animation to the stage
Declaration
public static GroupAnimationHolder Spawn(int groupID, int x, int y, int rotation1000, int rotationSpeed, int duration, int framePerSprite, bool loop, Color32 tint, int z = 2147483646, int renderLayer = 3)
Parameters
Type | Name | Description |
---|---|---|
int | groupID | Artwork sprite group ID |
int | x | Position X in global space |
int | y | Position Y in global space |
int | rotation1000 | Initialize rotation (0 means 0°, 1000 means 1°) |
int | rotationSpeed | Speed of the rotation (0 means 0°, 1 means 1°) |
int | duration | How long this animation is in frame. Set to -1 to get duration from artwork sprite group |
int | framePerSprite | How long does a single sprite takes in frame |
bool | loop | True if the animation loops |
Color32 | tint | Color tint |
int | z | Z value for sort rendering cells |
int | renderLayer | Which rendering layer does it renders into |
Returns
Type | Description |
---|---|
GroupAnimationHolder | Instance of the holder |
Spawn(int, int, int, int, int, int, int, int, int, int, int, bool, Color32, int, int)
Create a new animation to the stage
Declaration
public static GroupAnimationHolder Spawn(int groupID, int x, int y, int width, int height, int pivotX, int pivotY, int rotation1000, int rotationSpeed, int duration, int framePerSprite, bool loop, Color32 tint, int z = 2147483646, int renderLayer = 3)
Parameters
Type | Name | Description |
---|---|---|
int | groupID | Artwork sprite group ID |
int | x | Position X in global space |
int | y | Position Y in global space |
int | width | Size X in global space |
int | height | Size Y in global space |
int | pivotX | Pivot X of the artwork sprite |
int | pivotY | Pivot Y of the artwork sprite |
int | rotation1000 | Initialize rotation (0 means 0°, 1000 means 1°) |
int | rotationSpeed | Speed of the rotation (0 means 0°, 1 means 1°) |
int | duration | How long this animation is in frame. Set to -1 to get duration from artwork sprite group |
int | framePerSprite | How long does a single sprite takes in frame |
bool | loop | True if the animation loops |
Color32 | tint | Color tint |
int | z | Z value for sort rendering cells |
int | renderLayer | Which rendering layer does it renders into |
Returns
Type | Description |
---|---|
GroupAnimationHolder | Instance of the holder |