public bool check(GameBattleUnit unit, OnEventOver over) { GameBattleJudge judge = GameBattleManager.instance.ActiveBattleStage.Judge; // GameBattleEventManager.instance.showEvent( 0 , 0 , over ); // // return true; if (unit.KillEvent != GameDefine.INVALID_ID) { GameBattleEventManager.instance.showEvent(unit.KillEvent, 0, over); return(true); } return(false); }
public bool check() { GameBattleJudge judge = GameBattleManager.instance.ActiveBattleStage.Judge; for (int i = 0; i < judge.JudgeWin.Length; i++) { GameBattleJudgeWin win = judge.JudgeWin[i]; switch (win.Judge) { case GameBattleJudgeJudgeType.KillAll: { if (GameBattleUnitManager.instance.getEnemyCount(win.ID) == 0) { isWin = true; eventID = win.EventID; } } break; case GameBattleJudgeJudgeType.KillOne: { GameBattleUnit unit = GameBattleUnitManager.instance.getUnit(win.ID); if (unit == null || unit.IsKilled) { isWin = true; eventID = win.EventID; } } break; } } for (int i = 0; i < judge.JudgeLose.Length; i++) { GameBattleJudgeLose lose = judge.JudgeLose[i]; switch (lose.Judge) { case GameBattleJudgeJudgeType.KillAll: { if (GameBattleUnitManager.instance.getUserCount(lose.ID) == 0) { isLose = true; eventID = lose.EventID; } } break; case GameBattleJudgeJudgeType.KillOne: { GameBattleUnit unit = GameBattleUnitManager.instance.getUnit(lose.ID); if (unit == null || unit.IsKilled) { isLose = true; eventID = lose.EventID; } } break; } } if (isLose) { GameBattleEventManager.instance.showEvent(eventID, 0, null); return(true); } if (isWin) { UpdateProficiency(); GameUserData.instance.updateInTeam(); GameBattleEventManager.instance.showEvent(eventID, 0, null); return(true); } return(false); }