// Start is called before the first frame update
    void Start()
    {
        positionNode = grid.NodeFromWorldPoint(gameObject.transform.position);
        hidePosition = transform.position;

        InvokeRepeating("HideFromPlayer", 0f, 0.5f);
    }
Пример #2
0
 void Update()
 {
     if (enemy.enemyMode == EnemyFSM.Stopped)
     {
         enemy.room = grid.NodeFromWorldPoint(player.transform.position).room;
         grid.FindPath(enemy.transform.position, player.transform.position);
         enemy.nextNode  = grid.path[0];
         enemy.enemyMode = EnemyFSM.ChangingRoom;
     }
 }