FlipBookAnimation
NOTE. tick is NOT called automatically, therefore call this from the Actor's Behaviour. This is a deliberate deign choice (not an oversight, or laziness). For example, suppose an actor can be frozen
, then your behaviour will contain something like this :
if (!frozen) {
(actor.appearance as? Ticks)?.tick( ... )
}
Properties
The current FlipBookPage.
How long till we need to turn to the next page in the FlipBook.
The amount of time the current page has been shown.
Forwards get/set to the currentAppearance.
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.
Given a point in local coordinates, is it within the bounding box of this Appearance?
The actor's transformation has already been applied to Backend (using Backend.transform). So we do NOT need to use Actor.position, Actor.scale or Actor.angleRadians.
Returns two corners of a bounding rectangle in local coordinates.
Returns a list of local points which describes the bounding polygon. local
means the points are unrelated to the Actor's position, angle or scale.