public void Roll(bool updateSprite = true) { if (Value != -1) { return; } Value = DiceController.RollD6(); if (updateSprite) { SetImageByValue(); } OnDiceRoll?.Invoke(this); MusicManager.Instance.PlaySound(2); }
public void RollWithAnim(bool setRandValue = true) { //if (Value == -1) //{ if (_animator == null) { _animator = GetComponent <Animator>(); } if (setRandValue) { Value = DiceController.RollD6(); } SetRollAnimation(); OnDiceRoll?.Invoke(this); //} }