Aego Русский

Tweens and timers

A tween moves one property of a node from its current value to a target over time; a timer counts down and fires. Both run during Play and in aego run, belong to the play world and allocate nothing per frame once created.

import (
  "aego/curve"
  "aego/timer"
  "aego/tween"
)

func Hurt() coroutine {
  yield tween.ToColor(node, "SpriteRenderer.Tint", HitTint, 0.1, curve.OutQuad)
  yield tween.ToColor(node, "SpriteRenderer.Tint", Color{1, 1, 1, 1}, 0.3, curve.InQuad)
}