Exemplo n.º 1
0
 public void ExplodePartial(
     GameObject obj,
     Vector3 shotDir,
     Vector3 hitPosition,
     float bulletSize,
     ExploderObject.OnExplosion callback)
 {
     if (Object.op_Inequality((Object)obj, (Object)null))
     {
         long num = this.crackManager.ExplodePartial(obj, shotDir, hitPosition, bulletSize);
         if (callback == null)
         {
             return;
         }
         callback((float)num, ExploderObject.ExplosionState.ExplosionFinished);
     }
     else
     {
         long num = this.crackManager.ExplodeAll();
         if (callback == null)
         {
             return;
         }
         callback((float)num, ExploderObject.ExplosionState.ExplosionFinished);
     }
 }
Exemplo n.º 2
0
        public void Explode(ExploderObject.OnExplosion callback)
        {
            var settings = new ExploderSettings
            {
                Position              = ExploderUtils.GetCentroid(exploder.gameObject),
                DontUseTag            = exploder.DontUseTag,
                Radius                = exploder.Radius,
                ForceVector           = exploder.ForceVector,
                UseForceVector        = exploder.UseForceVector,
                Force                 = exploder.Force,
                FrameBudget           = exploder.FrameBudget,
                TargetFragments       = exploder.TargetFragments,
                DeactivateOptions     = exploder.DeactivateOptions,
                DeactivateTimeout     = exploder.DeactivateTimeout,
                MeshColliders         = exploder.MeshColliders,
                ExplodeSelf           = exploder.ExplodeSelf,
                HideSelf              = exploder.HideSelf,
                DestroyOriginalObject = exploder.DestroyOriginalObject,
                ExplodeFragments      = exploder.ExplodeFragments,
                SplitMeshIslands      = exploder.SplitMeshIslands,
                FragmentOptions       = exploder.FragmentOptions.Clone(),
                Callback              = callback,
                processing            = false,
            };

            queue.Enqueue(settings);
            ProcessQueue();
        }
Exemplo n.º 3
0
 public void Enqueue(
     ExploderObject exploderObject,
     ExploderObject.OnExplosion callback,
     bool crack,
     params GameObject[] obj)
 {
     this.queue.Enqueue(exploderObject, callback, crack, obj);
 }
Exemplo n.º 4
0
 public void ExplodePartial(
     GameObject obj,
     Vector3 shotDir,
     Vector3 hitPosition,
     float bulletSize,
     ExploderObject.OnExplosion callback)
 {
     this.core.ExplodePartial(obj, shotDir, hitPosition, bulletSize, callback);
 }
Exemplo n.º 5
0
        public void Enqueue(ExploderObject.OnExplosion callback, GameObject obj)
        {
            var settings = new ExploderSettings(exploder)
            {
                Callback   = callback,
                Target     = obj,
                processing = false
            };

            queue.Enqueue(settings);
            ProcessQueue();
        }
Exemplo n.º 6
0
        public void Enqueue(ExploderObject exploderObject, ExploderObject.OnExplosion callback, bool crack, params GameObject[] target)
        {
            var settings = new ExploderParams(exploderObject)
            {
                Callback   = callback,
                Targets    = target,
                Crack      = crack,
                processing = false
            };

            queue.Enqueue(settings);
            ProcessQueue();
        }
Exemplo n.º 7
0
 public void Enqueue(
     ExploderObject exploderObject,
     ExploderObject.OnExplosion callback,
     bool crack,
     params GameObject[] target)
 {
     this.queue.Enqueue(new ExploderParams(exploderObject)
     {
         Callback   = callback,
         Targets    = target,
         Crack      = crack,
         processing = false
     });
     this.ProcessQueue();
 }
Exemplo n.º 8
0
        public void EnqueuePartialExplosion(ExploderObject exploderObject, ExploderObject.OnExplosion callback,
                                            GameObject target, Vector3 shotDir, Vector3 hitPosition, float bulletSize)
        {
            var settings = new ExploderParams(exploderObject)
            {
                Callback         = callback,
                Target           = target,
                HitPosition      = hitPosition,
                BulletSize       = bulletSize,
                PartialExplosion = true,
                ShotDir          = shotDir,
                processing       = false,
            };

            queue.Enqueue(settings);
            ProcessQueue();
        }
Exemplo n.º 9
0
 public void ExplodeCracked(GameObject obj, ExploderObject.OnExplosion callback)
 {
     if (Object.op_Inequality((Object)obj, (Object)null))
     {
         long num = this.crackManager.Explode(obj);
         if (callback == null)
         {
             return;
         }
         callback((float)num, ExploderObject.ExplosionState.ExplosionFinished);
     }
     else
     {
         long num = this.crackManager.ExplodeAll();
         if (callback == null)
         {
             return;
         }
         callback((float)num, ExploderObject.ExplosionState.ExplosionFinished);
     }
 }
Exemplo n.º 10
0
        public void ExplodeCracked(GameObject obj, ExploderObject.OnExplosion callback)
        {
            if (obj != null)
            {
                var ms = crackManager.Explode(obj);

                if (callback != null)
                {
                    callback(ms, ExploderObject.ExplosionState.ExplosionFinished);
                }
            }
            else
            {
                var ms = crackManager.ExplodeAll();

                if (callback != null)
                {
                    callback(ms, ExploderObject.ExplosionState.ExplosionFinished);
                }
            }
        }
Exemplo n.º 11
0
 public void Enqueue(ExploderObject exploderObject, ExploderObject.OnExplosion callback, GameObject obj, Vector3 shotDir, Vector3 hitPosition, float bulletSize)
 {
 }
Exemplo n.º 12
0
 public void Enqueue(ExploderObject exploderObject, ExploderObject.OnExplosion callback, GameObject obj, bool crack)
 {
     queue.Enqueue(exploderObject, callback, obj, crack);
 }
Exemplo n.º 13
0
        public void ExplodePartial(GameObject obj, Vector3 shotDir, Vector3 hitPosition, float bulletSize, ExploderObject.OnExplosion callback)
        {
            if (obj != null)
            {
                var ms = crackManager.ExplodePartial(obj, shotDir, hitPosition, bulletSize);

                if (callback != null)
                {
                    callback(ms, ExploderObject.ExplosionState.ExplosionFinished);
                }
            }
            else
            {
                var ms = crackManager.ExplodeAll();

                if (callback != null)
                {
                    callback(ms, ExploderObject.ExplosionState.ExplosionFinished);
                }
            }
        }
Exemplo n.º 14
0
 public void ExplodeCracked(GameObject obj, ExploderObject.OnExplosion callback)
 {
     this.core.ExplodeCracked(obj, callback);
 }
Exemplo n.º 15
0
 public void ExplodeCracked(ExploderObject.OnExplosion callback)
 {
     this.ExplodeCracked((GameObject)null, callback);
 }
Exemplo n.º 16
0
 public void ExplodeObject(GameObject obj, ExploderObject.OnExplosion callback)
 {
     this.core.Enqueue(this, callback, false, obj);
 }
Exemplo n.º 17
0
 public void CrackRadius(ExploderObject.OnExplosion callback)
 {
     this.core.Enqueue(this, callback, true, (GameObject[])null);
 }
Exemplo n.º 18
0
 public void ExplodeObjects(ExploderObject.OnExplosion callback, params GameObject[] objects)
 {
     this.core.Enqueue(this, callback, false, objects);
 }