Pose
A small rectangular region of a Graphic that can be used as an Actor's Appearance.
For example, suppose our game contains an animal that can walk left and right. We will have a Pose for each frame of the animation as it walks. The names of these Poses might be left0
, left1
, left2
, right0
etc. We might also have poses for when it isn't moving called idle0
, idle1
etc.
Rather than creating a .png for each of these, we create a single Graphic and declare rectangular regions within it for each Pose.
Properties
Together with graphicTop, graphicLeft and graphicWidth, determines the rectangular region within the graphic.
Together with graphicTop, graphicWidth, graphicHeight, determines the rectangular region within the graphic. Measured in pixels, with (0,0) being at the top left of the image.
Only valid while the .kyd file is being loaded. Once loaded, resolveReferences is called, and afterward, graphicPath is reset to blank and no longer used.
Together with graphicLeft, graphicWidth, graphicHeight, determines the rectangular region within the graphic. Measured in pixels, with (0,0) being at the top left of the image. NOTE. Almost all other coordinates have the Y axis pointing upwards, whereas here, the Y axis points downwards.
Together with graphicTop, graphicLeft and graphicHeight, determines the rectangular region within the graphic.
When we animate an Actor, we change the actor's position (Actor.position)
Functions
Pose and Graphic return themselves. NinePatch returns a NinePatchAppearance.
Creates an Appearance with the same tint. Also, if the new appearances is StretchableAppearance then it will have the same bounds as the previous appearance.
Set the actor's appearance.