void Awake() { if (Instance == null) { Instance = this; } }
void OnDestroy() { if (Instance == this) { Instance = null; } }
// Use this for initialization void Start() { bow = GameObject.FindGameObjectWithTag("Bow").GetComponent <ArrowShoot>(); player = GameObject.FindGameObjectWithTag("Player"); arrowTeleport = transform.GetChild(0); enemyCounter = GameObject.Find("Enemies").GetComponent <EnemyCounter>(); effectLight.enabled = false; }
private void OnEnable() { _bow = GetComponentInParent <ArrowShoot>(); _stats = HeroStats.Get(); _sprite = GetComponentInChildren <SpriteRenderer>(); }
private void OnArrowShoot(InputAction.CallbackContext c) { ArrowShoot?.Invoke(); }