Example #1
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         GameObject.Destroy(this);
     }
 }
Example #2
0
 public void OnTriggerEnter(Collider other)
 {
     if (TapSwipe.attacking)
     {
         other.gameObject.GetComponentInParent <Disk>().die();
     }
     else if (other.tag == "Soul")
     {
         soul.Play();
         Destroy(other);
     }
     else if (other.tag == "Enemy")
     {
         die = true;
         LevelMovement.Stop();
         death.Play();
     }
 }
Example #3
0
    // Use this for initialization

    void Start()
    {
        levelRef = FindObjectOfType <LevelMovement>();
    }