Ejemplo n.º 1
0
    virtual public void UpdateVisualsPostMove()
    {
        // Snap to correct rotation/scale (no animating for now, no need).
        Rotation = GetRotationFromMyObject();
        Scale    = GetScaleFromMyObject();
        // Animate from old to new pos!
        Vector2 posFrom = MyBoardView.BoardToPos(MyTile.ColRow - MyTile.PrevMoveDelta);
        Vector2 posTo   = GetPosFromMyObject();

        LeanTween.cancel(this.gameObject);
        SetPos(posFrom); // start there now.
        LeanTween.value(this.gameObject, SetPos, posFrom, posTo, 0.18f).setEaseOutQuint();
    }
Ejemplo n.º 2
0
 protected Vector2 GetPosFromMyObject()
 {
     return(MyBoardView.BoardToPos(MyTile.ColRow));
 }