Esempio n. 1
0
 void OnExplosion(float timeMS, ExploderObject.ExplosionState state)
 {
     if (state == ExploderObject.ExplosionState.ExplosionFinished)
     {
         Finish();
     }
 }
Esempio n. 2
0
 private void OnExplosion(float time, ExploderObject.ExplosionState state)
 {
     if (state == ExploderObject.ExplosionState.ExplosionFinished)
     {
         //UnityEngine.Debug.Log("Exploded");
     }
 }
Esempio n. 3
0
 void OnExplosion(float time, ExploderObject.ExplosionState state)
 {
     if (state == ExploderObject.ExplosionState.ExplosionFinished)
     {
         //Utils.Log("Exploded");
     }
 }
Esempio n. 4
0
    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");
        }
    }
Esempio n. 5
0
 private void OnExplosion(float time, ExploderObject.ExplosionState state)
 {
     if (state != ExploderObject.ExplosionState.ExplosionFinished)
     {
         ;
     }
 }
Esempio n. 6
0
 void OnExplosion(float timeMS, ExploderObject.ExplosionState state)
 {
     if (state == ExploderObject.ExplosionState.ExplosionFinished)
     {
         Debug.Log("ExplodeObject finished!");
         Finish();
     }
 }
Esempio n. 7
0
        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;
        }
Esempio n. 8
0
        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()
        }
    }
Esempio n. 10
0
 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;
 }
Esempio n. 11
0
 /// <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)
 {
 }
Esempio n. 14
0
        private void OnCracked(float time, ExploderObject.ExplosionState state)
        {
//            Debug.Log("OnCracked: " + time + " " + state);
        }
Esempio n. 15
0
 private void OnCracked(float time, ExploderObject.ExplosionState state)
 {
     this.Exploder.ExplodeCracked(new ExploderObject.OnExplosion(this.OnExplosion));
 }