Example #1
0
    public void ApplyToAttribute(PlayerAttributeManager playerAttributeManager)
    {
        CharacterAttribute attribute = playerAttributeManager.GetAttribute(attributeType);

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

        attribute.RemoveModifier(this);
    }
Example #5
0
    public void ApplyToAttribute(PlayerAttributeManager playerAttributeManager)
    {
        CharacterAttribute attribute = playerAttributeManager.GetAttribute(attributeType);

        attribute.RegisterModifier(this);
    }