Пример #1
0
	public override void OnGUI(DatabaseEditor ed, GameCameraBase gameCam)
	{
		DefaultCam1 cam = gameCam as DefaultCam1;

		EditorGUILayout.BeginVertical(UniRPGEdGui.BoxStyle, GUILayout.Width(400));
		{
			UniRPGEdGui.LookLikeControls(160);
			cam.autoRotateToPlayer = EditorGUILayout.Toggle("Auto-rotate to player", cam.autoRotateToPlayer);
			cam.allowRotation = EditorGUILayout.Toggle("Allow rotation", cam.allowRotation);
			cam.allowZooming = EditorGUILayout.Toggle("Allow zooming", cam.allowZooming);
			EditorGUILayout.Space();

			cam.backDistance = EditorGUILayout.FloatField("Back Distance", cam.backDistance);
			cam.angle = EditorGUILayout.FloatField("Start Angle", cam.angle);
			EditorGUILayout.Space();

			cam.targetCenterOffset = EditorGUILayout.Vector3Field("Player Center Offset", cam.targetCenterOffset);
			EditorGUILayout.Space();

			cam.zoomSpeed = EditorGUILayout.FloatField("Zoom Speed", cam.zoomSpeed);
			cam.distance = EditorGUILayout.FloatField("Start Distance", cam.distance);
			cam.minZoomDistance = EditorGUILayout.FloatField("Min Zoom Distance", cam.minZoomDistance);
			cam.maxZoomDistance = EditorGUILayout.FloatField("Max Zoom Distance", cam.maxZoomDistance);
			EditorGUILayout.Space();

			cam.rotationStepping = EditorGUILayout.FloatField("Rotation Stepping", cam.rotationStepping);
			cam.rotationSpeed = EditorGUILayout.FloatField("Rotation Speed", cam.rotationSpeed);
			cam.autoRotationSpeed = EditorGUILayout.FloatField("Auto-rotation Speed", cam.autoRotationSpeed);

		}
		EditorGUILayout.EndVertical();
	}
Пример #2
0
	public override void OnGUI(DatabaseEditor ed, LoadSaveProviderBase loadSaveProvider)
	{
		//DefaultLoadSave provider = laodSaveProvider as DefaultLoadSave;
		EditorGUILayout.BeginVertical(UniRPGEdGui.BoxStyle, GUILayout.MaxWidth(350));
		{
			GUILayout.Label("This is the Default UniRPG LoadSave Provider.\nIt makes use of Unity's PlayerPrefs to save game state.");
		}
		EditorGUILayout.EndVertical();
	}
Пример #3
0
	// ================================================================================================================
	#region pub

	public override void OnGUI(DatabaseEditor ed)
	{
		base.OnGUI(ed);
		EditorGUILayout.BeginHorizontal();
		{
			LeftPanel();
			UniRPGEdGui.DrawVerticalLine(2f, UniRPGEdGui.DividerColor, 0f, 10f);
			RightPanel();
		}
		EditorGUILayout.EndHorizontal();
	}
Пример #4
0
	// ================================================================================================================

	public override void OnEnable(DatabaseEditor ed)
	{
		base.OnEnable(ed);
		
		// make sure there are not any NULL values in the list
		int cnt = ed.db.cameraPrefabs.Count;
		ed.db.cameraPrefabs = UniRPGUtil.CleanupList<GameObject>(ed.db.cameraPrefabs);
		if (cnt != ed.db.cameraPrefabs.Count)
		{
			EditorUtility.SetDirty(ed.db);
			AssetDatabase.SaveAssets();
		}
	}
Пример #5
0
	public override void OnGUI(DatabaseEditor ed)
	{
		base.OnGUI(ed);
		EditorGUILayout.BeginHorizontal();
		{
			// menu (on left side of window)
			selected = UniRPGEdGui.Menu(selected, MenuItems, GUILayout.Width(180));

			scroll[0] = EditorGUILayout.BeginScrollView(scroll[0]);
			{
				switch (selected)
				{
					case 0: ProjectScenesSettings(); break;
					case 1: LoadSaveSettings(); break;
					case 2: GlobalSettings(); break;
					case 3: GameStartSettings(); break;
					case 4: InputSettings(); break;
					case 5: GameSettings(); break;
					//case 6: is a spacer
					case 7: VariablesSettings(); break;
					case 8: ItemCategoriesSettings(); break;
					case 9: EquipSlotsSettings(); break;
					// case 10 is a spacer
					case 11: ActorCache(); break;
					case 12: ListRPGItems(); break;
				}
				GUILayout.FlexibleSpace();
			}
			EditorGUILayout.EndScrollView();//0
		}
		EditorGUILayout.EndHorizontal();

		// check if data changed and should be saved
		if (GUI.changed)
		{
			EditorUtility.SetDirty(ed.db);
		}
	}
Пример #6
0
	public virtual void OnGUI(DatabaseEditor ed, UnityEngine.GameObject menuGUIDataPrefab, UnityEngine.GameObject gameGUIDataPrefab) { }
Пример #7
0
	public virtual void OnGUI(DatabaseEditor ed) { this.ed = ed; }
Пример #8
0
	public virtual void Update(DatabaseEditor ed) { this.ed = ed;  }
Пример #9
0
	public virtual void OnDisable(DatabaseEditor ed) { this.ed = ed; }
Пример #10
0
	public virtual void OnGUI(DatabaseEditor ed, LoadSaveProviderBase loadSaveProvider) { }
Пример #11
0
	public override void OnGUI(DatabaseEditor ed, GameObject menuGUIDataPrefab, GameObject gameGUIDataPrefab)
	{
		DefaultMainMenuGUIData menuData = menuGUIDataPrefab.GetComponent<DefaultMainMenuGUIData>();
		DefaultGameGUIData gameData = gameGUIDataPrefab.GetComponent<DefaultGameGUIData>();

		EditorGUILayout.BeginHorizontal();
		{
			selected = UniRPGEdGui.Menu(selected, MenuItems, GUILayout.Width(180));

			scroll[0] = EditorGUILayout.BeginScrollView(scroll[0]);
			{
				switch (selected)
				{
					case 0: DrawBasicSettings(menuData, gameData); break;
					case 1: break; // is a seperator/heading
					case 2: DrawMenuSettings(menuData); break;
					case 3: DrawNewGameSettings(menuData); break;
					case 4: DrawOptions(menuData); break;
					case 5: break; // is a seperator/heading
					case 6: DrawMenuBarOptions(gameData); break;
					case 7: DrawActionBarSettings(gameData); break;
					case 8: DrawStatusPanels(gameData); break;
					case 9: DrawMisc(gameData); break;
				}
				GUILayout.FlexibleSpace();
			}
			EditorGUILayout.EndScrollView();
		}
		EditorGUILayout.EndHorizontal();

		// check if data changed and should be saved
		if (GUI.changed)
		{
			EditorUtility.SetDirty(menuGUIDataPrefab);
			EditorUtility.SetDirty(gameGUIDataPrefab);
		}
	}
Пример #12
0
	public override void OnGUI(DatabaseEditor ed)
	{
		base.OnGUI(ed);
		if (!CheckSelectedTheme(ed.db)) return;
		UniRPGEditorGlobal.GUIEditors[UniRPGEditorGlobal.activeGUIThemeIdx].editor.OnGUI(ed, ed.db.menuGUIData, ed.db.gameGUIData);
	}
Пример #13
0
	public virtual void OnGUI(DatabaseEditor ed, GameCameraBase gameCam) { }