private void Start() { es = EventSystem.current; _inputManager = FindObjectOfType <InputManager>(); _battleSystem = FindObjectOfType <BattleSystem_v2>(); bsMachine = FindObjectOfType <BattleStateMachine>(); }
// Use this for initialization void Start() { _battleSystem = FindObjectOfType <BattleSystem_v2>(); _unitHighlight = FindObjectOfType <UnitHighlight>(); _thisButton = GetComponent <Button>(); _nameText = GetComponent <ButtonOnClickSetter>(); ManaCost = Ability.GetComponent <BaseAbility>().ManaCost; _originalNormal = _thisButton.colors.normalColor; _originalHighlight = _thisButton.colors.highlightedColor; }
protected virtual void Start() { if (PointofAttack == null) { Debug.Log(gameObject.name + " missing point of attack"); } _battleSystem = FindObjectOfType <BattleSystem_v2>(); _bsMachine = FindObjectOfType <BattleStateMachine>(); _animator = GetComponent <Animator>(); Pointer = Instantiate(Pointer, transform); Pointer.transform.position = (PointofAttack != null)? PointofAttack.transform.position + Pointer_Offset : transform.position + Pointer_Offset; Pointer.SetActive(true); }
public void Init(UnitHighlight unitHighlight, BattleSystem_v2 battleSystem) { _unitHighlight = unitHighlight; _battleSystem = battleSystem; }