Esempio n. 1
0
    public void DoWalk()
    {
        if (path == null || player == null)
        {
            return;
        }
        if (characterController == null)
        {
            characterController = player.GetComponent <CharacterController>();
        }
        if (characterController == null)
        {
            return;
        }

        pathFinderNode = path[index];
        targetPos      = sceneInfo.GridToPixel(pathFinderNode.X, pathFinderNode.Y);
        player.transform.LookAt(targetPos);
        timerInfo = TimerManager.AddHandler(OnUpdateHandler);
    }