// Triggered On Every Successful Slice // Manage Game Objects void AfterSlice(Slice2D sliceResult) { GameObject cutObject = ThinSliceHelper.GetSmallestGameObject(sliceResult); if (cutObject != null) { ThinSliceHelper.ExplodeGameObject(cutObject, sliceResult.originGameObject); foreach (GameObject g in sliceResult.GetGameObjects()) { if (g != cutObject) { g.name = sliceResult.originGameObject.name; } else { g.name = "Falling Peace"; } } } ThinSliceGameManager.UpdateLevelProgress(); }
void Start() { ResetLevel(); instance = this; }