void OnChangeHealth(int health) { if (isLocalPlayer) { _gui.OnHealthChange(health, _maxHealth); } }
public void Init() { if (!isLocalPlayer) { return; } _gui = GetComponent <PlayerGui>(); _gui.OnHealthChange(_currentHealth, _maxHealth); }