Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.

public static final class ActorAnimator.Clip

  1. Object
  2. ActorAnimator.Clip
A run of frames.

Constructors

public Clip(int[] frames, int ticksPerFrame, boolean loop)Creates a clip.

Methods

public int frameAt(int ticks)The frame shown a number of ticks into the clip.

Inherited methods

Constructor details

Clip

public Clip(int[] frames, int ticksPerFrame, boolean loop)
Creates a clip.

Parameters

frames int[]
frame indices into the sheet, at least one
ticksPerFrame int
world ticks (1/60 s) each frame shows
loop boolean
whether it repeats; otherwise it holds the last frame

Method details

frameAt

public int frameAt(int ticks)
The frame shown a number of ticks into the clip.

Parameters

ticks int
ticks since the clip started

Returns

a sheet frame index