コード例 #1
0
    public override void Train()
    {
        // 添加训练命令
        TrainCaptiveCommand cmd = new TrainCaptiveCommand(mEnemyType, mWeaponType, mPosition, 1);

        mCommands.Add(cmd);
    }
コード例 #2
0
    // 訓練Soldier
    public override void Train()
    {
        // 產生一個訓練命令
        TrainCaptiveCommand NewCommand = new TrainCaptiveCommand(m_emEnemy, m_Position, m_PBDGame);

        AddTrainCommand(NewCommand);
    }
コード例 #3
0
    public override bool Train()
    {
        int energy = EnergyCostSoldierTrain;

        if (energy < 0)
        {
            GameFacade.Instance.ShowTipMessage("训练错误!");
            return(false);
        }
        if (GameFacade.Instance.UseEnergy(energy))
        {
            TrainCaptiveCommand cmd = new TrainCaptiveCommand(enemyType, WeaponType, Position);
            cmdList.AddLast(cmd);
            return(true);
        }
        else
        {
            GameFacade.Instance.ShowTipMessage("训练士兵能量不足,需要能量:" + energy);
        }
        return(false);
    }
コード例 #4
0
	// 訓練Soldier
	public override void Train()
	{
		// 產生一個訓練命令
		TrainCaptiveCommand NewCommand = new TrainCaptiveCommand( m_emEnemy, m_Position,m_PBDGame);  
		AddTrainCommand( NewCommand );
	}
コード例 #5
0
    public override void Train()
    {
        TrainCaptiveCommand cmd = new TrainCaptiveCommand(m_EnemyType, m_WeaponType, m_Position);

        m_Commands.Add(cmd);
    }