Esempio n. 1
0
    private void MoveEnemy()
    {
        List <Vector3Int> movementOptions = movementManager.GetMovementOptions();

        if (movementOptions.Count == 0)
        {
            em.Dispatch(new CharacterTurnEndEvent
            {
                character = gameObject
            });
        }
        else
        {
            GameObject nearestLemming = positionManager.FindNearestCharacter(transform.position, "Lemming");
            MoveToCell(strategyManager.CalculateNextMove(movementOptions, nearestLemming.transform.position));
        }
    }