public override void OnInspectorGUI() { TriggerController controller = target as TriggerController; DrawDefaultInspector(); if (GUILayout.Button("Update Triggers")) { UpdateTriggers(controller); } GUILayout.Space(20); GUILayout.Label("Current chapter: " + controller.currentChapter.value); chapter = EditorGUILayout.TextField("Current Chapter", chapter); Constants.SCENE_INDEXES cArea = (Constants.SCENE_INDEXES)controller.currentScene.value; cArea = (Constants.SCENE_INDEXES)EditorGUILayout.EnumPopup("Current Area", (Constants.SCENE_INDEXES)cArea); controller.currentScene.value = (int)cArea; Constants.RoomNumber cRoom = (Constants.RoomNumber)controller.currentRoomNumber.value; cRoom = (Constants.RoomNumber)EditorGUILayout.EnumPopup("Room Number", (Constants.RoomNumber)cRoom); controller.currentRoomNumber.value = (int)cRoom; GUILayout.Space(20); if (GUILayout.Button("Reactivate", GUILayout.Height(50))) { controller.currentChapter.value = chapter; ReactivateTriggers(controller); } }
public override void OnInspectorGUI() { AreaIntVariable areaInt = target as AreaIntVariable; GUILayout.Label("Value : " + areaInt.value.ToString()); asdf = (Constants.SCENE_INDEXES)EditorGUILayout.EnumPopup("Area", (Constants.SCENE_INDEXES)areaInt.value); areaInt.value = (int)asdf; }
/// <summary> /// Initializes all the window specific variables. /// </summary> void InitializeWindow() { cheatMenu = (CheatMenu)ScriptableObject.CreateInstance("CheatMenu"); dialogueMenu = (DialogueSceneEditorWindow)ScriptableObject.CreateInstance("DialogueSceneEditorWindow"); battleMenu = (BattleSceneEditorWindow)ScriptableObject.CreateInstance("BattleSceneEditorWindow"); _currentChapter = (Constants.CHAPTER)currentChapter.value; _currentArea = (Constants.SCENE_INDEXES)currentArea.value; _playerArea = (Constants.SCENE_INDEXES)playerArea.value; _currentRoom = (Constants.ROOMNUMBER)currentRoom.value; Debug.Log("Init"); }
/// <summary> /// Returns the type of the area. /// </summary> /// <param name="area"></param> /// <returns></returns> int GetAreaType(Constants.SCENE_INDEXES area) { switch (area) { case Constants.SCENE_INDEXES.BATTLE: case Constants.SCENE_INDEXES.SCORE: return(1); case Constants.SCENE_INDEXES.DIALOGUE: return(2); case Constants.SCENE_INDEXES.INVENTORY: case Constants.SCENE_INDEXES.SHOP: return(3); case Constants.SCENE_INDEXES.MAINMENU: return(4); default: return(0); } }
void DrawAreaValues() { GUILayout.Label("Area values", EditorStyles.boldLabel); _currentChapter = (Constants.CHAPTER)EditorGUILayout.EnumPopup("Current Chapter", _currentChapter); _currentArea = (Constants.SCENE_INDEXES)EditorGUILayout.EnumPopup("Current Scene Index", _currentArea); _playerArea = (Constants.SCENE_INDEXES)EditorGUILayout.EnumPopup("Current OW Scene Index", _playerArea); _currentRoom = (Constants.ROOMNUMBER)EditorGUILayout.EnumPopup("Current Room", _currentRoom); GUILayout.Label("Player values", EditorStyles.boldLabel); totalExp.value = EditorGUILayout.IntField("Total EXP", totalExp.value); totalMoney.value = EditorGUILayout.IntField("Total Money", totalMoney.value); GUILayout.Label("Player values", EditorStyles.boldLabel); EditorGUILayout.LabelField("Max health", playerMaxHealth.value.ToString()); GUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Android Attack", playerAttack.value.ToString()); EditorGUILayout.LabelField("Soldier Attack", playerSAttack.value.ToString()); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Android Defense", playerDefense.value.ToString()); EditorGUILayout.LabelField("Soldier Defense", playerSDefense.value.ToString()); GUILayout.EndHorizontal(); }
public override void OnInspectorGUI() { TriggerController controller = target as TriggerController; DrawDefaultInspector(); if (GUILayout.Button("Update Triggers")) { UpdateTriggers(controller); } GUILayout.Space(20); Constants.CHAPTER cChapter = (Constants.CHAPTER)controller.currentChapter.value; cChapter = (Constants.CHAPTER)EditorGUILayout.EnumPopup("Current Chapter", (Constants.CHAPTER)cChapter); controller.currentChapter.value = (int)cChapter; Constants.SCENE_INDEXES cArea = (Constants.SCENE_INDEXES)controller.currentScene.value; cArea = (Constants.SCENE_INDEXES)EditorGUILayout.EnumPopup("Current Area", (Constants.SCENE_INDEXES)cArea); controller.currentScene.value = (int)cArea; controller.currentPlayerArea.value = controller.currentScene.value; Constants.ROOMNUMBER cRoom = (Constants.ROOMNUMBER)controller.currentRoomNumber.value; cRoom = (Constants.ROOMNUMBER)EditorGUILayout.EnumPopup("Room Number", (Constants.ROOMNUMBER)cRoom); controller.currentRoomNumber.value = (int)cRoom; GUILayout.Space(20); if (GUILayout.Button("Reactivate", GUILayout.Height(50))) { ReactivateTriggers(controller); } if (GUILayout.Button("Verify trigger IDs")) { VerifyTriggers(controller); } }
public string AreaName() { Constants.SCENE_INDEXES scene = (Constants.SCENE_INDEXES)value; return(scene.ToString()); }