예제 #1
0
    /// <summary>
    /// 轰炸其他地块
    /// </summary>
    /// <param name="attackLand"></param>
    /// <param name="defenceLand"></param>
    public void BombAnotherLand(Land attackLand, Land defenceLand)
    {
        Camp attackCamp  = CampDic[attackLand.CampID];
        Camp defenceCamp = CampDic[defenceLand.CampID];
        int  bombPoint   = attackCamp.CannonBombPoint;
        int  leftUnit    = defenceLand.BattleUnit > bombPoint ? (defenceLand.BattleUnit - bombPoint) : 1;

        defenceLand.SetLandInfo(defenceLand.CampID, leftUnit);
        attackLand.cannon.isInCool = true;
        attackLand.cannon.lastFire = CurNumOfRounds;
        attackCamp.CannnoAttackConsume();
        if (BATTLE_EVENT_BOMB_ANOTHER_LAND != null)
        {
            BATTLE_EVENT_BOMB_ANOTHER_LAND();
        }
    }