public void ApplyToAttribute(PlayerAttributeManager playerAttributeManager) { CharacterAttribute attribute = playerAttributeManager.GetAttribute(attributeType); Debug.Log("apply modifier to " + attribute.ToString()); attribute.RegisterModifier(this); }
public void Apply(PlayerAttributeManager playerAttributeManager) { attachedPlayerAttributeManager = playerAttributeManager; foreach (var modifier in modifiers) { modifier.ApplyToAttribute(playerAttributeManager); } }
private void Awake() { characterController = GetComponent <CharacterController>(); animator = GetComponentInChildren <Animator>(); Cursor.lockState = CursorLockMode.Locked; currentStamima = maxStamina; playerAttributeManager = GetComponent <PlayerAttributeManager>(); }
public void RemoveFromAttribute(PlayerAttributeManager playerAttributeManager) { CharacterAttribute attribute = playerAttributeManager.GetAttribute(attributeType); attribute.RemoveModifier(this); }
public void ApplyToAttribute(PlayerAttributeManager playerAttributeManager) { CharacterAttribute attribute = playerAttributeManager.GetAttribute(attributeType); attribute.RegisterModifier(this); }