public void Unit_Destroy(object markObj, object idObj) { long ownerId = (long)idObj; ForceMark mark = (ForceMark)markObj; Utils.DebugUtils.Log(DebugUtils.Type.UI, string.Format("Unit destroyed: mark {0} id {1}", mark, ownerId)); if (IsEnemyDead(this.mark, mark)) { if (side == MatchSide.Red) { _view.SetRedKillCount(++redKillCount); } else if (side == MatchSide.Blue) { _view.SetBlueKillCount(++blueKillCount); } EnemyDead(); } else { if (this.mark == mark) { playerDeployedSquadNum--; if (playerDeployedSquadNum == (GameConstants.PLAYER_CANDEPLOY_UNIT_MAXCOUNT - 1)) { _view.ResetSquadDeployedLimitStatus(); } _view.SetKilledCount(++killedCount); _view.DestroyUnitcard(controllType, ownerId); _view.CanDeployUnits(emberCount); } if (side == MatchSide.Red) { _view.SetBlueKillCount(++blueKillCount); } else if (side == MatchSide.Blue) { _view.SetRedKillCount(++redKillCount); } } }