Exemplo n.º 1
0
 public void PlayDice(Dice dice)
 {
     if (motor.myTurn)
     {
         AudioSource.PlayClipAtPoint(damageSound, transform.position);
         motor.PlayDice(dice);
         UIManager.instance.inventory.RefreshDiceBar(motor.dices, this);
     }
 }
 void Update()
 {
     if (attackCoolDown > 0f)
     {
         attackCoolDown -= Time.deltaTime;
     }
     if (motor.myTurn && attackCoolDown <= 0f)
     {
         attackCoolDown = 1f;
         if (dicePlayable.Count != 0)
         {
             motor.PlayDice(dicePlayable[0]);
             dicePlayable.RemoveAt(0);
         }
         else
         {
             motor.myTurn = false;
         }
     }
 }