示例#1
0
 /// <summary>
 /// Updates the manager bar value based on the option the player chose
 /// </summary>
 /// <param name="combatChoice">The enum representing the combat choice the player decided upon</param>
 public void HandlePlayerCombatChoice(CombatChoice combatChoice)
 {
     // In the case of just testing this one scene in isolation
     if (ma.CurrentMonster == null || ma.CurrentMonster.CombatChoices == null || !ma.CurrentMonster.CombatChoices.ContainsKey(combatChoice))
     {
         IncrementValue(-10);
         return;
     }
     foreach (KeyValuePair <CombatChoice, CombatChoiceStatus> option in ma.CurrentMonster.CombatChoices)
     {
         if (option.Key == combatChoice)
         {
             IncrementValue(-1 * option.Value.Power);
         }
         option.Value.UpdatePower();
     }
 }
示例#2
0
 private void Awake()
 {
     instance = this;
 }