Пример #1
0
 private void HandleStaminaChangedEvent(StaminaChangedEvent sce)
 {
     if (sce.Character == GameManager.Instance.PlayerCharacter)
     {
         mStaminaCounter.text = sce.Stamina.ToString();
     }
 }
Пример #2
0
        public virtual void SetStamina(float value)
        {
            mCurrentStamina = value;
            mCurrentStamina = Mathf.Clamp(mCurrentStamina, 0.0f, mMaxStamina);
            StaminaChangedEvent evt = new StaminaChangedEvent(this, mCurrentStamina);

            VSEventManager.Instance.TriggerEvent(evt);
            Debug.Log("Character: " + name + " now has a stamina total of: " + mCurrentStamina);
        }