Small code cleanup
This commit is contained in:
16
Assets/Scripts/.idea/workspace.xml
generated
16
Assets/Scripts/.idea/workspace.xml
generated
@@ -1,10 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="9a79274b-4513-47db-b3be-e4fa96a1344d" name="Changes" comment="">
|
<list default="true" id="9a79274b-4513-47db-b3be-e4fa96a1344d" name="Changes" comment="" />
|
||||||
<change beforePath="$PROJECT_DIR$/../Scenes/MenuScene.unity" beforeDir="false" afterPath="$PROJECT_DIR$/../Scenes/MenuScene.unity" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/../../ProjectSettings/ShaderGraphSettings.asset" beforeDir="false" afterPath="$PROJECT_DIR$/../../ProjectSettings/ShaderGraphSettings.asset" afterDir="false" />
|
|
||||||
</list>
|
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||||
@@ -17,9 +14,9 @@
|
|||||||
<setting file="file://$PROJECT_DIR$/WindowSpawner.cs" root0="SKIP_HIGHLIGHTING" />
|
<setting file="file://$PROJECT_DIR$/WindowSpawner.cs" root0="SKIP_HIGHLIGHTING" />
|
||||||
</component>
|
</component>
|
||||||
<component name="MetaFilesCheckinStateConfiguration" checkMetaFiles="true" />
|
<component name="MetaFilesCheckinStateConfiguration" checkMetaFiles="true" />
|
||||||
<component name="ProjectColorInfo"><![CDATA[{
|
<component name="ProjectColorInfo">{
|
||||||
"associatedIndex": 3
|
"associatedIndex": 3
|
||||||
}]]></component>
|
}</component>
|
||||||
<component name="ProjectId" id="38FGbLLd0hthFI0yFQjPKUCip1O" />
|
<component name="ProjectId" id="38FGbLLd0hthFI0yFQjPKUCip1O" />
|
||||||
<component name="ProjectViewState">
|
<component name="ProjectViewState">
|
||||||
<option name="hideEmptyMiddlePackages" value="true" />
|
<option name="hideEmptyMiddlePackages" value="true" />
|
||||||
@@ -29,8 +26,10 @@
|
|||||||
"keyToString": {
|
"keyToString": {
|
||||||
"ModuleVcsDetector.initialDetectionPerformed": "true",
|
"ModuleVcsDetector.initialDetectionPerformed": "true",
|
||||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
|
"RunOnceActivity.git.unshallow": "true",
|
||||||
"RunOnceActivity.typescript.service.memoryLimit.init": "true",
|
"RunOnceActivity.typescript.service.memoryLimit.init": "true",
|
||||||
"git-widget-placeholder": "merge",
|
"git-widget-placeholder": "Pasha",
|
||||||
|
"nodejs_package_manager_path": "npm",
|
||||||
"vue.rearranger.settings.migration": "true"
|
"vue.rearranger.settings.migration": "true"
|
||||||
}
|
}
|
||||||
}]]></component>
|
}]]></component>
|
||||||
@@ -42,6 +41,7 @@
|
|||||||
<option name="presentableId" value="Default" />
|
<option name="presentableId" value="Default" />
|
||||||
<updated>1768387976497</updated>
|
<updated>1768387976497</updated>
|
||||||
<workItem from="1768387976765" duration="3000" />
|
<workItem from="1768387976765" duration="3000" />
|
||||||
|
<workItem from="1768497368334" duration="8000" />
|
||||||
</task>
|
</task>
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
|
|
||||||
|
using System;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -44,10 +45,10 @@ namespace Ext.B83.Unity.Editor.PropertyDrawers
|
|||||||
static MonoScriptPropertyDrawer()
|
static MonoScriptPropertyDrawer()
|
||||||
{
|
{
|
||||||
m_ScriptCache = new Dictionary<string, MonoScript>();
|
m_ScriptCache = new Dictionary<string, MonoScript>();
|
||||||
var scripts = Resources.FindObjectsOfTypeAll<MonoScript>();
|
MonoScript[] scripts = Resources.FindObjectsOfTypeAll<MonoScript>();
|
||||||
for (int i = 0; i < scripts.Length; i++)
|
for (int i = 0; i < scripts.Length; i++)
|
||||||
{
|
{
|
||||||
var type = scripts[i].GetClass();
|
Type type = scripts[i].GetClass();
|
||||||
if (type != null && !m_ScriptCache.ContainsKey(type.FullName))
|
if (type != null && !m_ScriptCache.ContainsKey(type.FullName))
|
||||||
{
|
{
|
||||||
m_ScriptCache.Add(type.FullName, scripts[i]);
|
m_ScriptCache.Add(type.FullName, scripts[i]);
|
||||||
@@ -84,7 +85,7 @@ namespace Ext.B83.Unity.Editor.PropertyDrawers
|
|||||||
{
|
{
|
||||||
if (script != null)
|
if (script != null)
|
||||||
{
|
{
|
||||||
var type = script.GetClass();
|
Type type = script.GetClass();
|
||||||
MonoScriptAttribute attr = (MonoScriptAttribute)attribute;
|
MonoScriptAttribute attr = (MonoScriptAttribute)attribute;
|
||||||
if (attr.type != null && !attr.type.IsAssignableFrom(type))
|
if (attr.type != null && !attr.type.IsAssignableFrom(type))
|
||||||
type = null;
|
type = null;
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ namespace InterfaceOff
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Makes sure the WindowInteractions and WindowComponents are setup before passing to user code */
|
/* Makes sure the WindowInteractions and WindowComponents are set up before passing to user code */
|
||||||
windowBase.Interactions = go.GetComponent<WindowInteractions>();
|
windowBase.Interactions = go.GetComponent<WindowInteractions>();
|
||||||
windowBase.Interactions.SetAttachedTo(windowBase);
|
windowBase.Interactions.SetAttachedTo(windowBase);
|
||||||
|
|
||||||
@@ -88,8 +88,8 @@ namespace InterfaceOff
|
|||||||
if (AutoSpawn)
|
if (AutoSpawn)
|
||||||
{
|
{
|
||||||
const int TICKS_PER_SECOND = 20;
|
const int TICKS_PER_SECOND = 20;
|
||||||
const int MINIMUM_SPAWN_TIME = 2 * 20;
|
const int MINIMUM_SPAWN_TIME = 2 * TICKS_PER_SECOND;
|
||||||
const int MAXIMUM_SPAWN_TIME = 5 * 20;
|
const int MAXIMUM_SPAWN_TIME = 5 * TICKS_PER_SECOND;
|
||||||
|
|
||||||
/* Decreases the spawn counter and spawns if at 0 */
|
/* Decreases the spawn counter and spawns if at 0 */
|
||||||
SpawnCounter = Math.Max(0, SpawnCounter - 1);
|
SpawnCounter = Math.Max(0, SpawnCounter - 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user