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