コード例 #1
0
ファイル: PlayerService.cs プロジェクト: OlegGelezcov/Casual
        public void RemoveHealth(float count)
        {
            float oldCount = health;

            health -= Mathf.Abs(count);
            health  = Mathf.Clamp(health, 0, maxHealth);
            if (!Mathf.Approximately(oldCount, health))
            {
                RavenhillEvents.OnPlayerHealthChanged(oldCount, health);
            }
        }