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

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

            if (pon != null)
            {
                pon.Damage(damage);
            }
        }
Example #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);
            }
        }
Example #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);
            }
        }