Esempio n. 1
0
    private void ActivateSelectedCommand()
    {
        activePlayer = playerUnitsReadyToSelectCommand.Dequeue();

        // Fill out the command with the current targets,
        // and send it back through the actor so that actor can update state.
        foreach (ActorCombatController target in currentTargets)
        {
            selectedCommand.AddTarget(target);
        }
        activePlayer.RegisterCommand(selectedCommand);

        // Mark selection and active player as null so we can move to next player.
        selectedCommand = null;
        activePlayer    = null;
        currentTargets.Clear();
    }