示例#1
0
 public void ChangeKaijuEmpireAIState(AIPlayer.PlayerState newState)
 {
     if (this.Released)
     {
         return;
     }
     if (this.aiPlayerKaijuEmpire != null)
     {
         this.aiPlayerKaijuEmpire.ChangeAIState(newState);
     }
 }
示例#2
0
    public void ChangeMajorEmpireAIState(Empire empire, AIPlayer.PlayerState newState)
    {
        if (empire == null)
        {
            throw new ArgumentNullException("empire");
        }
        if (this.Released)
        {
            return;
        }
        Diagnostics.Assert(this.aiPlayerMajorEmpires != null);
        AIPlayer aiplayer = this.aiPlayerMajorEmpires.Find((AIPlayer_MajorEmpire ai) => ai.MajorEmpire.Index == empire.Index);

        if (aiplayer != null)
        {
            aiplayer.ChangeAIState(newState);
        }
    }
示例#3
0
    public bool TryGetMajorEmpireAIState(Empire empire, out AIPlayer.PlayerState state)
    {
        if (empire == null)
        {
            throw new ArgumentNullException("empire");
        }
        if (this.Released)
        {
            state = AIPlayer.PlayerState.Deactivated;
            return(false);
        }
        Diagnostics.Assert(this.aiPlayerMajorEmpires != null);
        AIPlayer aiplayer = this.aiPlayerMajorEmpires.Find((AIPlayer_MajorEmpire ai) => ai.MajorEmpire.Index == empire.Index);

        if (aiplayer != null)
        {
            state = aiplayer.AIState;
            return(true);
        }
        state = AIPlayer.PlayerState.Deactivated;
        return(false);
    }