public static void registerRemoveObject(Transform select) { if (select == null) { return; } byte b; byte b2; if (Regions.tryGetCoordinate(select.position, out b, out b2)) { if (select.CompareTag("Barricade") || select.CompareTag("Structure")) { for (int i = 0; i < LevelObjects.buildables[(int)b, (int)b2].Count; i++) { if (LevelObjects.buildables[(int)b, (int)b2][i].transform == select) { LevelObjects.register(new ReunObjectRemove(LevelObjects.step, select, null, LevelObjects.buildables[(int)b, (int)b2][i].asset, select.position, select.rotation, select.localScale)); break; } } } else { for (int j = 0; j < LevelObjects.objects[(int)b, (int)b2].Count; j++) { if (LevelObjects.objects[(int)b, (int)b2][j].transform == select) { LevelObjects.register(new ReunObjectRemove(LevelObjects.step, select, LevelObjects.objects[(int)b, (int)b2][j].asset, null, select.position, select.rotation, select.localScale)); break; } } } } }
public static Transform registerAddObject(Vector3 position, Quaternion rotation, Vector3 scale, ObjectAsset objectAsset, ItemAsset itemAsset) { return(LevelObjects.register(new ReunObjectAdd(LevelObjects.step, objectAsset, itemAsset, position, rotation, scale))); }
public static void registerTransformObject(Transform select, Vector3 toPosition, Quaternion toRotation, Vector3 toScale, Vector3 fromPosition, Quaternion fromRotation, Vector3 fromScale) { LevelObjects.register(new ReunObjectTransform(LevelObjects.step, select, fromPosition, fromRotation, fromScale, toPosition, toRotation, toScale)); }