示例#1
0
 private void FadeErrorMessage(Tween tween)
 {
     errorText.Alpha = 1 - tween.Value;
 }
示例#2
0
 public static Tween Position(Entity entity, Vector2 target, int duration, Ease.Easer easer, TweenMode mode = TweenMode.Single)
 {
     Tween tween = new Tween(mode, easer, duration, true);
     Vector2 start = entity.Position;
     tween.OnUpdate = (Tween t) => { entity.Position = Vector2.Lerp(start, target, t.Value); };
     entity.Add(tween);
     return tween;
 }
示例#3
0
 private void FadeOut(Tween t)
 {
     image.Alpha = 1 - t.Value;
 }
示例#4
0
 public static Tween Add(Entity entity, int duration, Ease.Easer easer, Action<Tween> onUpdate, TweenMode mode = TweenMode.Single)
 {
     Tween tween = new Tween(mode, easer, duration, true);
     tween.OnUpdate = onUpdate;
     entity.Add(tween);
     return tween;
 }
示例#5
0
 private void Destroy(Tween t)
 {
     RemoveSelf();
 }