示例#1
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         GameObject.Destroy(this);
     }
 }
示例#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();
     }
 }
示例#3
0
    // Use this for initialization

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