public override void OnInspectorGUI() { serializedObject.Update(); DrawDefaultInspector(); MovingPlatformPath script = (MovingPlatformPath)target; if (GUILayout.Button("Set First Position")) { positionOne.vector3Value = script.transform.position; } if (GUILayout.Button("Set Second Position")) { positionTwo.vector3Value = script.transform.position; } if (GUILayout.Button("Create Path")) { script.CreatePath(); } serializedObject.ApplyModifiedProperties(); }
/// <summary> /// Triggered by Rotating Platfrom Addon /// Tells Platform it is no longer with path /// </summary> public void DisconnectFromPath() { if (path) { path.DisconnectPlatform(); path = null; } }
public MovingPlatform(MapLayer platformTiles, MapLayer platformTilesRaw, MapTopLayer platformTileTypes, short iWidth, short iHeight, short iDrawLayer, MovingPlatformPath path, bool fPreview) { this.platformTiles = platformTiles; this.platformTilesRaw = platformTilesRaw; this.platformTileTypes = platformTileTypes; this.iPlatformWidth = iWidth; this.iPlatformHeight = iHeight; // this.iWidth = iWidth; // this.iHeight = iHeight; this.iDrawLayer = iDrawLayer; this.path = path; this.fPreview = fPreview; }