void Start() { _slider = GetComponent<UISlider>(); _controller = CRUtility.GetComponentInParent<CRController>(transform); _health = _controller.creature.attributeManager.GetResource(CRResourceType.HEALTH); _foreground = transform.FindChild("Foreground").GetComponent<UISlicedSprite>(); _conditionManager = _controller.creature.conditionManager; }
void Start() { conditionManager = transform.parent.GetComponent<CRController>().creature.conditionManager; }
void Start() { _navMeshAgent = GetComponent<NavMeshAgent>(); _speed = GetComponent<CRController>().creature.attributeManager.GetAttribute(CRAttributeType.MOVE_SPEED); _conditionManager = GetComponent<CRController>().creature.conditionManager; }
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; }