Aego Русский

Animation

An animation clip changes properties of a node and its children over time: sprite frames, colors, transforms, script fields. An Animation Player plays one clip and reports its events to scripts.

Clip time, gameplay events and every track except the transform pose move on fixed steps, like physics. A replay of the same input gives the same frames, events and state hash at any frame rate.

func OnAnimEvent(id int, payload float) {
  if anim.EventName(id) == "Hit" {
    node.Child("Sword").Get<Hitbox2D>().Pulse()
  }
}