コード例 #1
0
        public CrackedObject Create(GameObject originalObject, ExploderParams parameters)
        {
            CrackedObject crackedObject = new CrackedObject(originalObject, parameters);

            this.crackedObjects[originalObject] = crackedObject;
            return(crackedObject);
        }
コード例 #2
0
ファイル: PostprocessCrack.cs プロジェクト: tzamora/churuko
        public override void Init()
        {
            base.Init();

            FragmentPool.Instance.ResetTransform();

            crackedObject = null;

            if (core.meshSet.Count > 0)
            {
                if (!core.splitMeshIslands)
                {
                    core.postList = new List <MeshObject>(core.meshSet);
                }

                if (core.postList[0].skinnedOriginal)
                {
                    crackedObject = core.crackManager.Create(core.postList[0].skinnedOriginal, core.parameters);
                }
                else
                {
                    crackedObject = core.crackManager.Create(core.postList[0].original, core.parameters);
                }

                //
                // initialize fragment pool
                //
                crackedObject.pool = FragmentPool.Instance.GetAvailableFragments(core.postList.Count);
            }
        }
コード例 #3
0
        public CrackedObject Create(GameObject originalObject, ExploderParams parameters)
        {
//            Debug.Assert(!crackedObjects.ContainsKey(originalObject), "GameObject already cracked!");

            var crackedObject = new CrackedObject(originalObject, parameters);

            crackedObjects[originalObject] = crackedObject;

            return(crackedObject);
        }
コード例 #4
0
        public long ExplodeAll()
        {
            long num = 0;

            using (Dictionary <GameObject, CrackedObject> .ValueCollection.Enumerator enumerator = this.crackedObjects.Values.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    CrackedObject current = enumerator.Current;
                    num += current.Explode();
                }
            }
            this.crackedObjects.Clear();
            return(num);
        }
コード例 #5
0
 public override void Init()
 {
     base.Init();
     FragmentPool.Instance.ResetTransform();
     FragmentPool.Instance.Reset(this.core.parameters);
     this.crackedObject = (CrackedObject)null;
     if (this.core.meshSet.Count <= 0)
     {
         return;
     }
     if (!this.core.splitMeshIslands)
     {
         this.core.postList = new List <MeshObject>((IEnumerable <MeshObject>) this.core.meshSet);
     }
     this.crackedObject      = this.core.crackManager.Create(!Object.op_Implicit((Object)this.core.postList[0].skinnedOriginal) ? this.core.postList[0].original : this.core.postList[0].skinnedOriginal, this.core.parameters);
     this.crackedObject.pool = FragmentPool.Instance.GetAvailableFragments(this.core.postList.Count);
 }
コード例 #6
0
 public FractureGrid(CrackedObject obj)
 {
 }
コード例 #7
0
ファイル: FractureGrid.cs プロジェクト: MakiMakiSa/TestRepo
//        private CrackedObject crackedObject;

        public FractureGrid(CrackedObject obj)
        {
//            crackedObject = obj;
        }