示例#1
0
    void OnTriggerEnter(Collider col)
    {
        if ((col.tag == "Enemies") || (col.tag == "Boss"))
        {
            AnimationMeth();
            BulletPool.Despawn(gameObject);
//          Destroy(gameObject);
        }

        //       if (col.tag == "BossFront")
        //       {
        //
        //            Destroy(gameObject);
        //       }

        //       if (col.tag == "BossBack")
        //       {

        //       Destroy(gameObject);
        //   }
    }
示例#2
0
    void OnBecameInvisible()
    {
        BulletPool.Despawn(gameObject);
//        Destroy(gameObject);
    }