public void Remove(CRCreature creature) { // Remove the modifiers creature.attributeManager.RemoveModifiers(_modifiers.ToArray()); creature.conditionManager.RemoveConditions(_conditions.ToArray()); // Stop tracking this creature _creatures.Remove(creature); }
public void Apply(CRCreature creature) { // Apply the modifiers creature.attributeManager.AddModifiers(_modifiers.ToArray()); creature.conditionManager.AddConditions(_conditions.ToArray()); // Track this creature for removal later _creatures.Add(creature); }
// Use this for initialization void Start() { _creature = GetComponentInChildren<CRCreature>(); _binding = GetComponent<CRControllerBinding>(); _controller = GetComponent<CRController>(); _guiInventory = GetComponentInChildren<GUIInventory>(); _guiEquipment = GetComponentInChildren<GUIEquipment>(); _guiInventory.enabled = toggleInventory; _guiEquipment.enabled = toggleInventory; }
void Awake() { _creature = gameObject.GetComponentInChildren<CRCreature>(); _movementBehaviour = gameObject.AddComponent<CRMovementBehaviour>(); _attackBehaviour = gameObject.AddComponent<CRAttackBehaviour>(); _abilityBehaviour = gameObject.AddComponent<CRAbilityBehaviour>(); }
public void Start() { _creature = GetComponent<CRCreature>(); if (_creature) { CRAttributeManager attributeManager = _creature.attributeManager; if (attributeManager) { _mitigation = attributeManager.GetAttribute(CRAttributeType.MITIGATION); _avoidChance = attributeManager.GetAttribute(CRAttributeType.AVOID_CHANCE); _dodgeChance = attributeManager.GetAttribute(CRAttributeType.DODGE_CHANCE); _parryChance = attributeManager.GetAttribute(CRAttributeType.PARRY_CHANCE); _blockChance = attributeManager.GetAttribute(CRAttributeType.AVOID_CHANCE); _deflectChance = attributeManager.GetAttribute(CRAttributeType.DEFLECT_CHANCE); _reflectChance = attributeManager.GetAttribute(CRAttributeType.REFLECT_CHANCE); _armorRating = attributeManager.GetAttribute(CRAttributeType.ARMOR_RATING); _avoidRating = attributeManager.GetAttribute(CRAttributeType.AVOID_RATING); _dodgeRating = attributeManager.GetAttribute(CRAttributeType.DODGE_RATING); _parryRating = attributeManager.GetAttribute(CRAttributeType.PARRY_RATING); _blockRating = attributeManager.GetAttribute(CRAttributeType.AVOID_RATING); _deflectRating = attributeManager.GetAttribute(CRAttributeType.DEFLECT_RATING); _reflectRating = attributeManager.GetAttribute(CRAttributeType.REFLECT_RATING); } } }
public void Start() { _creature = GetComponent<CRCreature>(); CRAttributeManager attributeManager = _creature.attributeManager; if (attributeManager) { _missChance = attributeManager.GetAttribute(CRAttributeType.MISS_CHANCE); _critChance = attributeManager.GetAttribute(CRAttributeType.CRIT_CHANCE); _crushChance = attributeManager.GetAttribute(CRAttributeType.CRUSH_CHANCE); _doubleChance = attributeManager.GetAttribute(CRAttributeType.DOUBLE_ATK_CHANCE); _tripleChance = attributeManager.GetAttribute(CRAttributeType.TRIPLE_ATK_CHANCE); _haste = attributeManager.GetAttribute(CRAttributeType.HASTE); _attackRating = attributeManager.GetAttribute(CRAttributeType.ATTACK_RATING); _hitRating = attributeManager.GetAttribute(CRAttributeType.HIT_RATING); _critRating = attributeManager.GetAttribute(CRAttributeType.CRIT_RATING); _crushRating = attributeManager.GetAttribute(CRAttributeType.CRUSH_RATING); _doubleRating = attributeManager.GetAttribute(CRAttributeType.DOUBLE_ATK_RATING); _tripleRating = attributeManager.GetAttribute(CRAttributeType.TRIPLE_ATK_RATING); _hasteRating = attributeManager.GetAttribute(CRAttributeType.HASTE_RATING); _magicRating = attributeManager.GetAttribute(CRAttributeType.MAGIC_RATING); _damage = attributeManager.GetAttribute(CRAttributeType.DAMAGE); } }