public CrackedObject Create(GameObject originalObject, ExploderParams parameters) { CrackedObject crackedObject = new CrackedObject(originalObject, parameters); this.crackedObjects[originalObject] = crackedObject; return(crackedObject); }
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); } }
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); }
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); }
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); }
public FractureGrid(CrackedObject obj) { }
// private CrackedObject crackedObject; public FractureGrid(CrackedObject obj) { // crackedObject = obj; }