Пример #1
0
    IEnumerator GoToBase()
    {
        timePassed = 0;
        while (timePassed < 4 || timePassed == -1)
        {
            timePassed += Time.deltaTime;
            if (timePassed >= 4)
            {
                if (cs != null)
                {
                    this.gameObject.transform.position = cs.GetInitialPos();
                    playerController.SetCanMove(true);
                }
            }

            yield return(null);
        }
    }