private void ExplodeObject(GameObject obj) { // DONE! #if ENABLE_CRACK_AND_EXPLODE Exploder.CrackObject(obj, OnCracked); #else Exploder.ExplodeObject(obj, OnExplosion); #endif }
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)); }
public override void gameOver() { if (_currentShip != null) { exploder.transform.position = _currentShip.transform.position; exploder.ExplodeObject(_currentShip, null); Destroy(_currentShip); _currentShip = null; } }
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); } }