Exemplo n.º 1
0
    private void MakePathFromPlayer()
    {
        Vector2 spiderPosition = _spider.transform.position;

        _spiderPosition = new IntVector2((int)spiderPosition.x, (int)spiderPosition.y);
        IntVector2 playerPos = _playerManager.GetPlayerCurrentPos() + new IntVector2(0, 1);

        _pathListToPlayer = PathFinder.FindPath(_levelManager.GetLevel(), _spiderPosition, playerPos);
        //ColorPath(_pathListToPlayer, Color.red);
    }