Esempio n. 1
0
    void move()
    {
        if (plannedDir == -1)
        {
            return;
        }

        MoveTransition.StartTransitionTo((Vector2)transform.position + PlannedDirection * MoveDistance);
        Indicators[plannedDir].enabled = false;
    }
Esempio n. 2
0
    IEnumerator Start()
    {
        MovementTransition.AttachMonoBehaviour(this);
        MovementTransition.Value = StartPoint.position;

        bool @switch = false;

        while (true)
        {
            MovementTransition.StartTransitionTo((@switch ? StartPoint : EndPoint).position);
            @switch = !@switch;

            yield return(new WaitWhile(() => MovementTransition.Transitioning));
        }
    }