예제 #1
0
        private void ExplodeObject(GameObject obj)
        {
            // DONE!
#if ENABLE_CRACK_AND_EXPLODE
            Exploder.CrackObject(obj, OnCracked);
#else
            Exploder.ExplodeObject(obj, OnExplosion);
#endif
        }
예제 #2
0
        private void ExplodeObject(GameObject obj)
        {
            ExploderObject component = (ExploderObject)obj.GetComponent <ExploderObject>();

            if (!Object.op_Implicit((Object)component))
            {
                return;
            }
            component.ExplodeObject(((Component)this).get_gameObject(), new ExploderObject.OnExplosion(this.OnExplosion));
        }
예제 #3
0
 public override void gameOver()
 {
     if (_currentShip != null)
     {
         exploder.transform.position = _currentShip.transform.position;
         exploder.ExplodeObject(_currentShip, null);
         Destroy(_currentShip);
         _currentShip = null;
     }
 }
예제 #4
0
    public void OnTriggerEnter(Collider otherObj)
    {
        if (otherObj.CompareTag("Mirror"))
        {
            return;
        }

        if (otherObj.tag == "BodyPart")
        {
            exploder.transform.position   = new Vector3(gameObject.transform.position.x, gameObject.transform.position.y - 0.06f, gameObject.transform.position.z);
            gameObject.transform.position = new Vector3(gameObject.transform.position.x, gameObject.transform.position.y - 0.06f, gameObject.transform.position.z);
            exploder.ExplodeObject(gameObject, null);
            //Destroy(gameObject, 5);
        }

        if (otherObj.tag == "Ship")
        {
            exploder.transform.position   = new Vector3(gameObject.transform.position.x, gameObject.transform.position.y - 0.06f, gameObject.transform.position.z);
            gameObject.transform.position = new Vector3(gameObject.transform.position.x, gameObject.transform.position.y - 0.06f, gameObject.transform.position.z);
            exploder.ExplodeObject(gameObject, null);
            //Destroy(gameObject, 5);
        }
    }