예제 #1
0
 public ExploderParams(ExploderObject exploder)
 {
     Position                    = ExploderUtils.GetCentroid(exploder.gameObject);
     DontUseTag                  = exploder.DontUseTag;
     Radius                      = exploder.Radius;
     UseCubeRadius               = exploder.UseCubeRadius;
     CubeRadius                  = exploder.CubeRadius;
     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;
     ThreadOptions               = exploder.ThreadOption;
     DestroyOriginalObject       = exploder.DestroyOriginalObject;
     ExplodeFragments            = exploder.ExplodeFragments;
     SplitMeshIslands            = exploder.SplitMeshIslands;
     FragmentOptions             = exploder.FragmentOptions.Clone();
     SFXOptions                  = exploder.SFXOptions.Clone();
     Use2DCollision              = exploder.Use2DCollision;
     FragmentPoolSize            = exploder.FragmentPoolSize;
     FragmentPrefab              = exploder.FragmentPrefab;
     FadeoutOptions              = exploder.FadeoutOptions;
     DisableRadiusScan           = exploder.DisableRadiusScan;
     UniformFragmentDistribution = exploder.UniformFragmentDistribution;
     DisableTriangulation        = exploder.DisableTriangulation;
     ExploderGameObject          = exploder.gameObject;
 }
 public ExploderSettings(ExploderObject exploder)
 {
     Position = ExploderUtils.GetCentroid(exploder.gameObject);
     DontUseTag = exploder.DontUseTag;
     Radius = exploder.Radius;
     UseCubeRadius = exploder.UseCubeRadius;
     CubeRadius = exploder.CubeRadius;
     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();
     SfxOptions = exploder.SFXOptions.Clone();
     Use2DCollision = exploder.Use2DCollision;
     FragmentPoolSize = exploder.FragmentPoolSize;
     FragmentPrefab = exploder.FragmentPrefab;
     FadeoutOptions = exploder.FadeoutOptions;
     SFXOptions = exploder.SFXOptions;
     DisableRadiusScan = exploder.DisableRadiusScan;
     UniformFragmentDistribution = exploder.UniformFragmentDistribution;
     AllowOpenMeshCutting = exploder.AllowOpenMeshCutting;
 }
예제 #3
0
 /// <summary>
 /// set options for deactivations
 /// </summary>
 public void SetDeactivateOptions(DeactivateOptions options, FadeoutOptions fadeoutOptions, float timeout)
 {
     if (pool != null)
     {
         foreach (var fragment in pool)
         {
             fragment.deactivateOptions = options;
             fragment.deactivateTimeout = timeout;
             fragment.fadeoutOptions    = fadeoutOptions;
         }
     }
 }
예제 #4
0
 /// <summary>
 /// set options for deactivations
 /// </summary>
 public void SetDeactivateOptions(DeactivateOptions options, FadeoutOptions fadeoutOptions, float timeout)
 {
     if (pool != null)
     {
         foreach (var fragment in pool)
         {
             fragment.deactivateOptions = options;
             fragment.deactivateTimeout = timeout;
             fragment.fadeoutOptions = fadeoutOptions;
         }
     }
 }