コード例 #1
0
 @Override
 public void onChallengerLose(Human challenger, IBattleUnit beChallenged) {
   HumanWarriorManager warriorManager = challenger.getHumanWarriorManager();
   warriorManager.refreshOpponent(true);
   warriorManager.sendUpdateOpponentMessage();
   int damage = orignalHp - beChallenged.getBattleContext().getBattleProperty().getHp();
   warriorManager.updateQuestCounter(damage / (orignalHp * 1f));
 }
コード例 #2
0
 @Override
 public void onChallengerWin(Human challenger, IBattleUnit beChallenged) {
   HumanWarriorManager warriorManager = challenger.getHumanWarriorManager();
   warriorManager.refreshOpponent(true);
   warriorManager.sendUpdateOpponentMessage();
   warriorManager.addWarriorHeartNum(winRewardWarriorHeartNum);
   warriorManager.updateQuestCounter(1);
 }