public void Initialize(PlayerUnit player) { if(healthAttribute != null) healthAttribute.OnAttributeChange -= OnAttributeChange; currentPlayer = player; healthAttribute = currentPlayer.AttributePool.GetAttribute(AttributeType.Health); healthAttribute.OnAttributeChange += OnAttributeChange; OnAttributeChange(healthAttribute.MaxValue, healthAttribute.CurrentValue); }
public void Initialize(PlayerUnit player) { if (healthAttribute != null) { healthAttribute.OnAttributeChange -= OnAttributeChange; } currentPlayer = player; healthAttribute = currentPlayer.AttributePool.GetAttribute(AttributeType.Health); healthAttribute.OnAttributeChange += OnAttributeChange; OnAttributeChange(healthAttribute.MaxValue, healthAttribute.CurrentValue); }