示例#1
0
        public void AddMaxHealth(int count)
        {
            int oldCount = maxHealth;

            maxHealth += count;
            if (oldCount != maxHealth)
            {
                RavenhillEvents.OnPlayerMaxHealthChanged(oldCount, maxHealth);
            }
            if (count > 0)
            {
                AddHealth(Mathf.Clamp(maxHealth - health, 0, maxHealth));
            }
        }