示例#1
0
文件: Dice.cs 项目: Feargin/DarkPower
 public void Roll(bool updateSprite = true)
 {
     if (Value != -1)
     {
         return;
     }
     Value = DiceController.RollD6();
     if (updateSprite)
     {
         SetImageByValue();
     }
     OnDiceRoll?.Invoke(this);
     MusicManager.Instance.PlaySound(2);
 }
示例#2
0
文件: Dice.cs 项目: Feargin/DarkPower
 public void RollWithAnim(bool setRandValue = true)
 {
     //if (Value == -1)
     //{
     if (_animator == null)
     {
         _animator = GetComponent <Animator>();
     }
     if (setRandValue)
     {
         Value = DiceController.RollD6();
     }
     SetRollAnimation();
     OnDiceRoll?.Invoke(this);
     //}
 }