Ejemplo n.º 1
0
    void PlayAgentTurn(Agent agent, Blocker blocker, bool prediction)
    {
        Command command = agent.GetCommand();

        if (command != null && !agent.IsDead)
        {
            if (overridesOnTiles[agent.Index.x, agent.Index.y] != null)
            {
                command = overridesOnTiles[agent.Index.x, agent.Index.y].GetResult(command);
            }
            Override overrideOnTurn = agent.GetOverride();
            if (overrideOnTurn != null)
            {
                command = overrideOnTurn.GetResult(command);
            }
            agent.ExecuteCommand(blocker, prediction, command);
        }
    }