コード例 #1
0
 public MoveButton(Button b, CombatMoveType c)
 {
     uiButton          = b;
     buttonText        = b.GetComponentInChildren <Text>();
     moveTypeToDisplay = c;
     buttonText.text   = c.GetMoveByType().MoveName;
 }
コード例 #2
0
 public MoveButton(Button b, CombatMoveType c)
 {
     uiButton          = b;
     buttonText        = b.GetComponentInChildren <Text>();
     moveTypeToDisplay = c;
     buttonText.text   = c.GetMoveByType().MoveName;
     TimeStamp         = DateTime.Now.Second;
 }
コード例 #3
0
ファイル: BaseUnit.cs プロジェクト: ASYelsub/LLBB
 public void BroadcastUnitAttacked(CombatMoveType moveUsed)
 {
     Debug.Log(name + " used: " + moveUsed);
     if (TargetToEffect != null)
     {
         if (UnitAttacked != null)
         {
             var combat = moveUsed.GetMoveByType();
             if (SufficientStamina(combat.StaminaRequired))
             {
                 UnitAttacked(TargetToEffect, combat.DamageCalculationOutput(this, TargetToEffect) * this.IdealDistanceFactor(TargetToEffect));
             }
             CurrentStamina.CurrentValue -= combat.StaminaRequired;
         }
     }
 }
コード例 #4
0
 public bool FinishedCoolDown()
 {
     return((DateTime.Now.Second - TimeStamp) > moveTypeToDisplay.GetMoveByType().CoolDown);
 }