В чем ошибки??
using System;
namespace AsemblyCSharp {
public interface IHpSystem
{
float CurrentHp { get; }
bool IsDead { get; }
void SubstructHp {float val};
void AddHp {float val };
}
public class HpSystem : BaseSystem, IHpSystem
{
public float CurrentHp { get; protected set; }
public bool IsDead { get; protected set; }
public HpSystem(CharacterController controller) : base(controller)
{
CurrentHp = CharacterController.MaxHP;
IsDead = false;
}
public void SubstructHp(float val)
{
if (val > 0)
{
CurrentHp -= val;
if (CurrentHp <= 0)
IsDead = true;
}
else
UnityEngine.Debug.Log("Error Substruct value");
}
public void AddHp(float val)
{
if (val > 0)
{
CurrentHp += val;
if (CurrentHp > characterController.MaxHp)
CurrentHp = characterController.MaxHp;
}
else {
UnityEngine.Debug.Log("Error add value");
}
}
}