Beispiel #1
0
    public IEnumerator ChooseNextRoom(ChildManager child, Transform next)
    {
        float timestamp = Time.time;

        child.SwitchToState(ChildManager.ChildrenAnimation.Idle);

        while (Time.time - timestamp < 3)
        {
            yield return(null);
        }

        child.nextRoom = next;
        child.ResetChild();
        child.agent.isStopped = false;
        child.SwitchToState(ChildManager.ChildrenAnimation.Run);
        child.canMove = true;
    }