Пример #1
0
    public RXTweenChain Add(object target, float duration, TweenConfig config)
    {
        config.onComplete(HandleTweenComplete);
        Tween tween = new Tween(target, duration, config, null);

        tweensToDo.Add(tween);
        return(this);
    }
Пример #2
0
 public static TweenConfig destroyWhenComplete(this TweenConfig config)
 {
     config.onComplete((tween) => { ((tween as Tween).target as SKDestroyable).Destroy(); });
     return(config);
 }
Пример #3
0
 public static TweenConfig removeWhenComplete(this TweenConfig config)
 {
     config.onComplete(HandleRemoveWhenDoneTweenComplete);
     return(config);
 }
Пример #4
0
 //forward to an action with no arguments instead (ex you can pass myNode.RemoveFromContainer)
 public static TweenConfig onComplete(this TweenConfig config, Action onCompleteAction)
 {
     config.onComplete((tween) => { onCompleteAction(); });
     return(config);
 }
Пример #5
0
 public static TweenConfig hideWhenComplete(this TweenConfig config)
 {
     config.onComplete((tween) => { ((tween as Tween).target as FNode).isVisible = false; });
     return(config);
 }
Пример #6
0
 public static TweenConfig removeWhenComplete(this TweenConfig config)
 {
     config.onComplete((tween) => { ((tween as Tween).target as FNode).RemoveFromContainer(); });
     return(config);
 }
Пример #7
0
 public void CallGameOver()
 {
     player.RemoveFromContainer();
     TweenConfig tw = new TweenConfig();
     tw.floatProp("alpha", 0);
     tw.onComplete(theTween =>
     {
         Game.instance.GoToPage(PageType.MenuPage);
     });
     Go.to(this, 2f, tw);
 }