void OnExplosion(float timeMS, ExploderObject.ExplosionState state) { if (state == ExploderObject.ExplosionState.ExplosionFinished) { Finish(); } }
private void OnExplosion(float time, ExploderObject.ExplosionState state) { if (state == ExploderObject.ExplosionState.ExplosionFinished) { //UnityEngine.Debug.Log("Exploded"); } }
void OnExplosion(float time, ExploderObject.ExplosionState state) { if (state == ExploderObject.ExplosionState.ExplosionFinished) { //Utils.Log("Exploded"); } }
private void OnExplode(float timeMS, ExploderObject.ExplosionState state) { if (state == ExploderObject.ExplosionState.ExplosionStarted) { // deactivate the grenade game object ExploderUtils.SetVisible(gameObject, false); // play explosion sound SourceExplosion.PlayOneShot(ExplosionSound); Flash.gameObject.transform.position = gameObject.transform.position; Flash.gameObject.transform.position += Vector3.up; // turn on flash light for 5 frames flashing = 10; ExplosionEffect.gameObject.transform.position = gameObject.transform.position; // ExplosionEffect.Emit(1); ExploderUtils.Log("OnExplode started"); } if (state == ExploderObject.ExplosionState.ExplosionFinished) { ExplodeFinished = true; explosionInProgress = false; ExploderUtils.Log("OnExplode finished"); } }
private void OnExplosion(float time, ExploderObject.ExplosionState state) { if (state != ExploderObject.ExplosionState.ExplosionFinished) { ; } }
void OnExplosion(float timeMS, ExploderObject.ExplosionState state) { if (state == ExploderObject.ExplosionState.ExplosionFinished) { Debug.Log("ExplodeObject finished!"); Finish(); } }
private void OnExplode(float timeMS, ExploderObject.ExplosionState state) { if (state != ExploderObject.ExplosionState.ExplosionStarted) { return; } this.SourceExplosion.PlayOneShot(this.ExplosionSound); ((Component)this.Flash).get_gameObject().get_transform().set_position(this.ChairBomb.get_transform().get_position()); Transform transform = ((Component)this.Flash).get_gameObject().get_transform(); transform.set_position(Vector3.op_Addition(transform.get_position(), Vector3.get_up())); this.flashing = 10; }
private void OnExplode(float timeMS, ExploderObject.ExplosionState state) { if (state == ExploderObject.ExplosionState.ExplosionStarted) { // play explosion sound SourceExplosion.PlayOneShot(ExplosionSound); Flash.gameObject.transform.position = ChairBomb.transform.position; Flash.gameObject.transform.position += Vector3.up; // turn on flash light for 10 frames flashing = 10; } }
/// <summary> /// exploder callback /// </summary> void OnExplosion(float time, ExploderObject.ExplosionState state) { // explosion is finished if (state == ExploderObject.ExplosionState.ExplosionFinished) { //! //! HERE IS THE LIST OF ACTIVE FRAGMENTS //! // var list = FragmentPool.Instance.GetActiveFragments(); // NOTE: // if you run another explosion afterwards and you dont clear or deactivate fragmets in fragment pool // you might get some of the fragments from old explosion as well // to deactivate fragments you can call FragmentPool.Instance.DeactivateFragments() } }
private void OnExplode(float timeMS, ExploderObject.ExplosionState state) { if (state == ExploderObject.ExplosionState.ExplosionStarted) { ExploderUtils.SetVisible(((Component)this).get_gameObject(), false); this.SourceExplosion.PlayOneShot(this.ExplosionSound); ((Component)this.Flash).get_gameObject().get_transform().set_position(((Component)this).get_gameObject().get_transform().get_position()); Transform transform = ((Component)this.Flash).get_gameObject().get_transform(); transform.set_position(Vector3.op_Addition(transform.get_position(), Vector3.get_up())); this.flashing = 10; } if (state != ExploderObject.ExplosionState.ExplosionFinished) { return; } this.ExplodeFinished = true; this.explosionInProgress = false; }
/// <summary> /// callback when the object is cracked /// </summary> private void OnCracked(float time, ExploderObject.ExplosionState state) { // now the object is cracked we can call ExplodeCracked() now or later ... Exploder.ExplodeCracked(OnExplosion); }
private void OnCracked(float time, ExploderObject.ExplosionState state) { }
private void OnExplosion(float time, ExploderObject.ExplosionState state) { }
private void OnCracked(float time, ExploderObject.ExplosionState state) { // Debug.Log("OnCracked: " + time + " " + state); }
private void OnCracked(float time, ExploderObject.ExplosionState state) { this.Exploder.ExplodeCracked(new ExploderObject.OnExplosion(this.OnExplosion)); }