/// <summary> /// Triggers the Roll Animation and set the stamina cost for this action /// </summary> public virtual void Roll() { OnRoll.Invoke(); isRolling = true; animator.CrossFadeInFixedTime("Roll", rollTransition, baseLayer); ReduceStamina(rollStamina, false); currentStaminaRecoveryDelay = 2f; }
IEnumerator RollAnimation() { yield return(new WaitForSeconds(1f)); _animDice.SetBool("OnRoll", false); _animDice.enabled = false; _imgDice.sprite = rollNumbers[diceNumber - 1]; OnRoll?.Invoke(this, EventArgs.Empty); }
public void Start() { var rand = new Random(); while (true) { var init = rand.Next(0, 36); OnRoll?.Invoke(init); Thread.Sleep(15000); } }
protected void TriggerRoll(Vector3 direction) => OnRoll?.Invoke(direction);
public override void StartTurn() { OnRoll?.Invoke(); }
protected void NotifySubscribers(RollResult result) => OnRoll?.Invoke(this, result);