Skip to content

Commit

Permalink
SKCell v0.15.2 Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Skyrim07 committed Nov 15, 2023
1 parent 2b25c1c commit 44628df
Show file tree
Hide file tree
Showing 179 changed files with 172 additions and 158,278 deletions.
2 changes: 1 addition & 1 deletion Assets/SKCell/CSV/SKCSVLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace SKCell
{
[AddComponentMenu("SKCell/SKCSVLoader")]
[AddComponentMenu("SKCell/CSV/SKCSVLoader")]
public class SKCSVLoader : MonoSingleton<SKCSVLoader>
{
protected override void Awake()
Expand Down
2 changes: 1 addition & 1 deletion Assets/SKCell/Common/SKAudioManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace SKCell
{
[AddComponentMenu("SKCell/SKAudioManager")]
[AddComponentMenu("SKCell/Misc/SKAudioManager")]
public class SKAudioManager : MonoSingleton<SKAudioManager>
{
public AudioSource musicAudioSource;
Expand Down
2 changes: 1 addition & 1 deletion Assets/SKCell/Common/SKCommonTimer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace SKCell
{
[ExecuteInEditMode]
[AddComponentMenu("SKCell/SKCommonTimer")]
[AddComponentMenu("SKCell/Misc/SKCommonTimer")]
public sealed class SKCommonTimer : MonoSingleton<SKCommonTimer>
{
private double scaledTimer = 0f;
Expand Down
2 changes: 1 addition & 1 deletion Assets/SKCell/Common/SKReferenceHolder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using TMPro;

namespace SKCell {
[AddComponentMenu("SKCell/SKReferenceHolder")]
[AddComponentMenu("SKCell/Misc/SKReferenceHolder")]
public class SKReferenceHolder : MonoBehaviour
{
[SKFolder("Basic")]
Expand Down
2 changes: 1 addition & 1 deletion Assets/SKCell/Common/SKSceneManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace SKCell
{
[AddComponentMenu("SKCell/SKSceneManager")]
[AddComponentMenu("SKCell/Misc/SKSceneManager")]

public class SKSceneManager : MonoSingleton<SKSceneManager>
{
Expand Down
11 changes: 9 additions & 2 deletions Assets/SKCell/Console/SKConsole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@

namespace SKCell
{
[AddComponentMenu("SKCell/Console/SKConsole")]
public class SKConsole : MonoSingleton<SKConsole>
{
[SKInspectorText("Please click on < Generate Structure > \nto start using SKConsole for the first time.")]
[SerializeField] int descrip_text;
public bool activeOnAwake = false;
public static bool IsOpen { get { return instance.gameObject.activeSelf; } }
static SKConsoleCommand root = new SKConsoleCommand();

Expand All @@ -24,14 +26,19 @@ public class SKConsole : MonoSingleton<SKConsole>
private Stack<SKConsoleCommand> currentCommandStack = new Stack<SKConsoleCommand>();
public Dictionary<string, SKConsoleCommand> commandLookup;

private void Start()
protected override void Awake()
{
base.Awake();
inputField.onValueChanged.AddListener(OnInputValueChanged);
inputField.onEndEdit.AddListener(OnInputComplete);

currentCommandStack.Push(root);
commandLookup = new Dictionary<string, SKConsoleCommand>();
PopulateCommandLookup(root);

gameObject.SetActive(activeOnAwake);
if (activeOnAwake)
Open();
}

#region Public Methods
Expand Down
4 changes: 2 additions & 2 deletions Assets/SKCell/Core/SKCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ namespace SKCell
[DisallowMultipleComponent]
[RequireComponent(typeof(SKCommonTimer))]
[RequireComponent(typeof(SKPoolManager))]
[AddComponentMenu("SKCell/SKCore")]
[AddComponentMenu("SKCell/Core/SKCore")]
public sealed class SKCore : MonoSingleton<SKCore>
{
public const string SKCELL_VERSION = "v0.15.1";
public const string SKCELL_VERSION = "v0.15.2";

public static Action Awake000 = new Action(EmptyAction), Awake100 = new Action(EmptyAction),
Start000 = new Action(EmptyAction), Start100 = new Action(EmptyAction), Start200 = new Action(EmptyAction),
Expand Down
8 changes: 4 additions & 4 deletions Assets/SKCell/Dialogue/Dialogue 101.asset
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ MonoBehaviour:
uid: 164022
rect:
serializedVersion: 2
x: 1080.1111
y: 813.8889
x: 1077.1111
y: 807.8889
width: 100
height: 130
oRect:
Expand Down Expand Up @@ -679,8 +679,8 @@ MonoBehaviour:
uid: 612312
rect:
serializedVersion: 2
x: 1186.1111
y: 1358.8889
x: 1149.1111
y: 1327.8889
width: 100
height: 80
oRect:
Expand Down
14 changes: 0 additions & 14 deletions Assets/SKCell/Dialogue/SKDialogueNode.cs

This file was deleted.

11 changes: 0 additions & 11 deletions Assets/SKCell/Dialogue/SKDialogueNode.cs.meta

This file was deleted.

1 change: 1 addition & 0 deletions Assets/SKCell/Dialogue/SKDialoguePlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

namespace SKCell
{
[AddComponentMenu("SKCell/Dialogue/SKDialoguePlayer")]
public class SKDialoguePlayer : MonoBehaviour
{
public SKDialogueAsset asset;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,9 @@ public class SKHierarchy

static SKHierarchy()
{
SKAssetLibrary.ClearTextureCache();

EditorApplication.hierarchyWindowItemOnGUI += HandleHierarchyWindowItemOnGUI;

srContent = new GUIContent(SKAssetLibrary.LoadTexture($"ObjectIcons/obj_icon_7"));
cldContent = new GUIContent(SKAssetLibrary.LoadTexture($"ObjectIcons/obj_icon_11"));
folderTexture = SKAssetLibrary.LoadTexture($"ObjectIcons/obj_icon_1");
crossContent = new GUIContent(SKAssetLibrary.LoadTexture($"cross_1"));
resetContent = new GUIContent(SKAssetLibrary.LoadTexture($"return"));

LoadResources();
rename_Style = new GUIStyle();
rename_Style.fixedHeight = 10;
rename_Style.fixedWidth = 10;
Expand All @@ -47,7 +40,7 @@ static SKHierarchy()
normalTexture.Apply();

Texture2D hoverTexture = new Texture2D(1, 1);
hoverTexture.SetPixel(0, 0, new Color(1, 1, 1, 0.2f));
hoverTexture.SetPixel(0, 0, new Color(1, 1, 1, 0.2f));
hoverTexture.Apply();

transparentButtonStyle.normal.background = normalTexture;
Expand All @@ -60,7 +53,7 @@ static SKHierarchy()
normalTexture.Apply();

hoverTexture = new Texture2D(1, 1);
hoverTexture.SetPixel(0, 0, new Color(.4f, .4f, .4f, 0.9f));
hoverTexture.SetPixel(0, 0, new Color(.4f, .4f, .4f, 0.9f));
hoverTexture.Apply();

blackButtonStyle.normal.background = normalTexture;
Expand All @@ -69,9 +62,22 @@ static SKHierarchy()
highlightColorSolid.a = 1;
}


private static void LoadResources()
{
SKAssetLibrary.ClearTextureCache();
srContent = new GUIContent(SKAssetLibrary.LoadTexture($"ObjectIcons/obj_icon_7"));
cldContent = new GUIContent(SKAssetLibrary.LoadTexture($"ObjectIcons/obj_icon_11"));
folderTexture = SKAssetLibrary.LoadTexture($"ObjectIcons/obj_icon_1");
crossContent = new GUIContent(SKAssetLibrary.LoadTexture($"cross_1"));
resetContent = new GUIContent(SKAssetLibrary.LoadTexture($"return"));
}

private static void HandleHierarchyWindowItemOnGUI(int instanceID, Rect selectionRect)
{
if (folderTexture==null)
{
LoadResources();
}
GameObject _object = EditorUtility.InstanceIDToObject(instanceID) as GameObject;
GameObject obj = _object as GameObject;
//separators
Expand Down Expand Up @@ -158,30 +164,38 @@ private static void HandleHierarchyWindowItemOnGUI(int instanceID, Rect selectio
}



Rect iconRect = new Rect(selectionRect);
iconRect.xMin -= 0;
iconRect.xMax = iconRect.xMin + 16;
//col = Selection.activeObject == obj?new Color(.17f,.35f,.6f): new Color(.25f,.25f,.25f);
col =new Color(.25f,.25f,.25f);
EditorGUI.DrawRect(iconRect, col);
if (!isSeparator)
if (obj != null)
{
GUI.DrawTexture(iconRect, GetHierarchyIcon(obj));

if (GUI.Button(iconRect, "", transparentButtonStyle))
Rect iconRect = new Rect(selectionRect);
iconRect.xMin -= 0;
iconRect.xMax = iconRect.xMin + 16;
//col = Selection.activeObject == obj?new Color(.17f,.35f,.6f): new Color(.25f,.25f,.25f);
col = new Color(.25f, .25f, .25f);
EditorGUI.DrawRect(iconRect, col);
if (!isSeparator)
{
Vector2 screenMousePosition = GUIUtility.GUIToScreenPoint(Event.current.mousePosition);
float differenceY = screenMousePosition.y - Event.current.mousePosition.y;
float iconScreenY = iconRect.y + differenceY;
Vector2 windowPosition = new Vector2(iconRect.x + 30, iconScreenY + 16);
ObjectIconPopup.ShowWindow(windowPosition, obj);
Texture tex = GetHierarchyIcon(obj);
if (tex != null)
{
EditorGUI.DrawRect(iconRect, col);
GUI.DrawTexture(iconRect, tex);
}

if (GUI.Button(iconRect, "", transparentButtonStyle))
{
Vector2 screenMousePosition = GUIUtility.GUIToScreenPoint(Event.current.mousePosition);
float differenceY = screenMousePosition.y - Event.current.mousePosition.y;
float iconScreenY = iconRect.y + differenceY;
Vector2 windowPosition = new Vector2(iconRect.x + 30, iconScreenY + 16);
ObjectIconPopup.ShowWindow(windowPosition, obj);

}
}
else
{
EditorGUI.DrawRect(iconRect, col);
GUI.DrawTexture(iconRect, folderTexture);
}
}
else
{
GUI.DrawTexture(iconRect, folderTexture);
}

}
Expand Down
File renamed without changes.
File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions Assets/SKCell/Editor/Misc.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
8 changes: 8 additions & 0 deletions Assets/SKCell/Editor/Mono_Comp.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions Assets/SKCell/Editor/PathDesigner.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 44628df

Please sign in to comment.