Beispiel #1
0
 void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
 }
Beispiel #2
0
 void OnDestroy()
 {
     if (Instance == this)
     {
         Instance = null;
     }
 }
Beispiel #3
0
    // 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;
    }
Beispiel #4
0
 private void OnEnable()
 {
     _bow    = GetComponentInParent <ArrowShoot>();
     _stats  = HeroStats.Get();
     _sprite = GetComponentInChildren <SpriteRenderer>();
 }
 private void OnArrowShoot(InputAction.CallbackContext c)
 {
     ArrowShoot?.Invoke();
 }