コード例 #1
0
        public bool ApplyDamageToTroop(PartyAttackComposition attack, CharacterObject troop, out float damage)
        {
            TroopState troopState      = GetTroopState(troop);
            bool       isFinishingBlow = troopState.TakeHit(attack, out damage);

            return(isFinishingBlow);
        }
コード例 #2
0
 public TroopState GetTroopState(CharacterObject troop)
 {
     if (!TroopStates.TryGetValue(troop.Id, out TroopState troopState))
     {
         InformationManager.DisplayMessage(new InformationMessage(
                                               "Warning: " + troop.Name.ToString() + " is not registered for battle."));
         troopState            = new TroopState(this, troop, 1);
         TroopStates[troop.Id] = troopState;
     }
     return(troopState);
 }