portals and dash. Also a bit of terrain building and level design
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
using UnityEditor;
|
||||
|
||||
namespace RotaryHeart.Lib.SerializableDictionary
|
||||
{
|
||||
public sealed class Constants
|
||||
{
|
||||
private const bool DEF_SHOW_PAGES = false;
|
||||
private const bool DEF_SHOW_SIZE = true;
|
||||
private const int DEF_PAGE_COUNT = 15;
|
||||
|
||||
private const string ID_SHOW_PAGES = "RHSD_ShowPages";
|
||||
private const string ID_SHOW_SIZE = "RHSD_ShowSize";
|
||||
private const string ID_PAGE_COUNT = "RHSD_PageCount";
|
||||
|
||||
public static bool ShowPages
|
||||
{
|
||||
get
|
||||
{
|
||||
return EditorPrefs.GetBool(ID_SHOW_PAGES, DEF_SHOW_PAGES);
|
||||
}
|
||||
set
|
||||
{
|
||||
EditorPrefs.SetBool(ID_SHOW_PAGES, value);
|
||||
}
|
||||
}
|
||||
public static bool ShowSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return EditorPrefs.GetBool(ID_SHOW_SIZE, DEF_SHOW_SIZE);
|
||||
}
|
||||
set
|
||||
{
|
||||
EditorPrefs.SetBool(ID_SHOW_SIZE, value);
|
||||
}
|
||||
}
|
||||
public static int PageCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return EditorPrefs.GetInt(ID_PAGE_COUNT, DEF_PAGE_COUNT);
|
||||
}
|
||||
set
|
||||
{
|
||||
EditorPrefs.SetInt(ID_PAGE_COUNT, value);
|
||||
}
|
||||
}
|
||||
|
||||
public static void RestoreDefaults()
|
||||
{
|
||||
ShowPages = DEF_SHOW_PAGES;
|
||||
ShowSize = DEF_SHOW_SIZE;
|
||||
PageCount = DEF_PAGE_COUNT;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e8f7fab786cd2c04194e604600b27211
|
||||
timeCreated: 1538180000
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,19 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
|
||||
namespace RotaryHeart.Lib.SerializableDictionary
|
||||
{
|
||||
[InitializeOnLoad]
|
||||
public class Definer
|
||||
{
|
||||
static Definer()
|
||||
{
|
||||
List<string> defines = new List<string>(1)
|
||||
{
|
||||
"RH_SerializedDictionary"
|
||||
};
|
||||
|
||||
RotaryHeart.Lib.Definer.ApplyDefines(defines);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: db381ff7b4ec4384d8ec4f8cf79d7398
|
||||
timeCreated: 1539019300
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 535421d7cb5b6b943a76e5f0c855d5d3
|
||||
timeCreated: 1517621586
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,85 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace RotaryHeart.Lib.SerializableDictionary
|
||||
{
|
||||
public class PreferencesWindow
|
||||
{
|
||||
#region GUIContent
|
||||
static readonly GUIContent gui_pagesTitle = new GUIContent("Pages", "Section that has all the pages settings for the drawer");
|
||||
static readonly GUIContent gui_showPages = new GUIContent("Show Pages", "Should the drawer be divided in pages?");
|
||||
static readonly GUIContent gui_showSizes = new GUIContent("Show Sizes", "Should the dictionary show the size on the title bar?");
|
||||
static readonly GUIContent gui_pageCount = new GUIContent("Page Count", "How many elements per page are going to be drawn");
|
||||
#endregion
|
||||
|
||||
// Have we loaded the prefs yet
|
||||
private static bool prefsLoaded = false;
|
||||
|
||||
//Default values
|
||||
private static bool showPages;
|
||||
private static bool showSize;
|
||||
private static int pageCount;
|
||||
|
||||
#if UNITY_2018_3_OR_NEWER
|
||||
private class MyPrefSettingsProvider : SettingsProvider
|
||||
{
|
||||
public MyPrefSettingsProvider(string path, SettingsScope scopes = SettingsScope.Project)
|
||||
: base(path, scopes)
|
||||
{ }
|
||||
|
||||
public override void OnGUI(string searchContext)
|
||||
{
|
||||
PreferencesGUI();
|
||||
}
|
||||
}
|
||||
|
||||
[SettingsProvider]
|
||||
static SettingsProvider MyNewPrefCode()
|
||||
{
|
||||
return new MyPrefSettingsProvider("Preferences/RHSD");
|
||||
}
|
||||
#else
|
||||
// Add preferences section named "My Preferences" to the Preferences Window
|
||||
[PreferenceItem("RHSD")]
|
||||
#endif
|
||||
public static void PreferencesGUI()
|
||||
{
|
||||
if (!prefsLoaded)
|
||||
{
|
||||
showPages = Constants.ShowPages;
|
||||
showSize = Constants.ShowSize;
|
||||
pageCount = Constants.PageCount;
|
||||
|
||||
prefsLoaded = true;
|
||||
}
|
||||
|
||||
EditorGUILayout.LabelField(gui_pagesTitle, EditorStyles.boldLabel);
|
||||
EditorGUILayout.Space();
|
||||
|
||||
showSize = EditorGUILayout.Toggle(gui_showSizes, showSize);
|
||||
showPages = EditorGUILayout.Toggle(gui_showPages, showPages);
|
||||
|
||||
GUI.enabled = showPages;
|
||||
|
||||
pageCount = Mathf.Clamp(EditorGUILayout.IntField(gui_pageCount, pageCount), 5, int.MaxValue);
|
||||
|
||||
GUI.enabled = true;
|
||||
|
||||
if (GUI.changed)
|
||||
{
|
||||
Constants.ShowPages = showPages;
|
||||
Constants.ShowSize = showSize;
|
||||
Constants.PageCount = pageCount;
|
||||
}
|
||||
|
||||
GUILayout.FlexibleSpace();
|
||||
|
||||
if (GUILayout.Button("Restore Default"))
|
||||
{
|
||||
Constants.RestoreDefaults();
|
||||
|
||||
prefsLoaded = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 28956686d1e55594b904610e0b1614d5
|
||||
timeCreated: 1538179311
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,35 @@
|
||||
using UnityEditor;
|
||||
|
||||
namespace RotaryHeart.Lib.SerializableDictionary
|
||||
{
|
||||
public class SupportWindow : BaseSupportWindow
|
||||
{
|
||||
const string SUPPORT_FORUM = "https://forum.unity.com/threads/released-serializable-dictionary.518178/";
|
||||
const string STORE_LINK = "https://assetstore.unity.com/packages/tools/utilities/serialized-dictionary-110992";
|
||||
const string ASSET_NAME = "Serializable Dictionary Lite";
|
||||
const string VERSION = "2.6.9.4";
|
||||
|
||||
protected override string SupportForum
|
||||
{
|
||||
get { return SUPPORT_FORUM; }
|
||||
}
|
||||
protected override string StoreLink
|
||||
{
|
||||
get { return STORE_LINK; }
|
||||
}
|
||||
protected override string AssetName
|
||||
{
|
||||
get { return ASSET_NAME; }
|
||||
}
|
||||
protected override string Version
|
||||
{
|
||||
get { return VERSION; }
|
||||
}
|
||||
|
||||
[MenuItem("Tools/Rotary Heart/Serializable Dictionary/About")]
|
||||
public static void ShowWindow()
|
||||
{
|
||||
ShowWindow<SupportWindow>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c148ddc40f9a15d4dbbbd484dbdec41a
|
||||
timeCreated: 1526321196
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user