Ejemplo n.º 1
0
    void Start()
    {
        CRCreature creature = CRUtility.GetComponentInParent<CRCreature>(transform);

        if (null != creature)
            _manager = creature.attributeManager;

        if (_manager)
        {
            FindSourceValue();
        }

        if (null != targetValue)
        {
            targetValue.AddModifier(this);
        }
    }
Ejemplo n.º 2
0
    private void Awake()
    {
        _attributeManager = GetComponentInChildren<CRAttributeManager>();
        _abilityManager = GetComponentInChildren<CRAbilityManager>();
        _effectManager = gameObject.AddComponent<CREffectManager>();
        _conditionManager = gameObject.AddComponent<CRConditionManager>();

        _equipment = GetComponentInChildren<CREquipment>();
        _inventory = GetComponentInChildren<CRInventory>();

        _offence = GetComponent<CROffence>();
        _defence = GetComponent<CRDefence>();

        _faction = GetComponent<CRFaction>();

        if (_equipment && _attributeManager)
            _equipment.attributeManager = _attributeManager;

        _effectManager.creature = this;
    }