예제 #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);
            }
        }