Esempio n. 1
0
 void OnTriggerEnter2D(Collider2D other)                                             //Checks for collision with the player
 {
     if (other.gameObject.tag == "PlayerOneProjectile" || other.gameObject.tag == "PlayerTwoProjectile")
     {
         DeathManager.killProjectile(other.gameObject);
     }
 }
Esempio n. 2
0
    public void resetProjectile()                                 //在这段代码中没有注释
    {
        GameObject proj;                                          //在这段代码中没有注释

        proj = GameObject.Find("PlayerOneProjectile(Clone)");     //在这段代码中没有注释
        if (proj == null)                                         //在这段代码中没有注释
        {
            proj = GameObject.Find("PlayerTwoProjectile(Clone)"); //在这段代码中没有注释
        }

        if (proj != null)                      //在这段代码中没有注释
        {
            DeathManager.killProjectile(proj); //在这段代码中没有注释
        }
    }