示例#1
0
        void OnCollisionEnter(Collision collision)
        {
            pon = collision.gameObject.GetComponent<IAPon>();

            if(pon != null)
                pon.Damage(damage);
        }
示例#2
0
        void OnCollisionEnter(Collision collision)
        {
            pon = collision.gameObject.GetComponent <IAPon>();

            if (pon != null)
            {
                pon.Damage(damage);
            }
        }
示例#3
0
        void OnCollisionEnter(Collision collision)
        {
            pon = collision.gameObject.GetComponent<IAPon>();

            if(pon != null)
                pon.Damage(damage);
            if(type == "minigun")
                Destroy(gameObject);

            if(type == "plasma")
            {
                FX = Instantiate(Resources.Load("Prefab/PlasmaFX")) as GameObject;
                FX.transform.position = transform.position;
                FX.transform.parent = GameObject.FindGameObjectWithTag("GameController").transform;
                Destroy(FX, 0.25f);
                Destroy(gameObject);
            }
        }
示例#4
0
        void OnCollisionEnter(Collision collision)
        {
            pon = collision.gameObject.GetComponent <IAPon>();

            if (pon != null)
            {
                pon.Damage(damage);
            }
            if (type == "minigun")
            {
                Destroy(gameObject);
            }

            if (type == "plasma")
            {
                FX = Instantiate(Resources.Load("Prefab/PlasmaFX")) as GameObject;
                FX.transform.position = transform.position;
                FX.transform.parent   = GameObject.FindGameObjectWithTag("GameController").transform;
                Destroy(FX, 0.25f);
                Destroy(gameObject);
            }
        }