Small code cleanup

This commit is contained in:
2026-01-15 17:27:52 +00:00
parent 08bde0da45
commit 6fb0c358e1
3 changed files with 15 additions and 14 deletions

View File

@@ -1,10 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<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>
<list default="true" id="9a79274b-4513-47db-b3be-e4fa96a1344d" name="Changes" comment="" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@@ -17,9 +14,9 @@
<setting file="file://$PROJECT_DIR$/WindowSpawner.cs" root0="SKIP_HIGHLIGHTING" />
</component>
<component name="MetaFilesCheckinStateConfiguration" checkMetaFiles="true" />
<component name="ProjectColorInfo"><![CDATA[{
"associatedIndex": 3
}]]></component>
<component name="ProjectColorInfo">{
&quot;associatedIndex&quot;: 3
}</component>
<component name="ProjectId" id="38FGbLLd0hthFI0yFQjPKUCip1O" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
@@ -29,8 +26,10 @@
"keyToString": {
"ModuleVcsDetector.initialDetectionPerformed": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"RunOnceActivity.git.unshallow": "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"
}
}]]></component>
@@ -42,6 +41,7 @@
<option name="presentableId" value="Default" />
<updated>1768387976497</updated>
<workItem from="1768387976765" duration="3000" />
<workItem from="1768497368334" duration="8000" />
</task>
<servers />
</component>

View File

@@ -29,6 +29,7 @@
#if UNITY_EDITOR
using System;
using UnityEngine;
using UnityEditor;
using System.Collections.Generic;
@@ -44,10 +45,10 @@ namespace Ext.B83.Unity.Editor.PropertyDrawers
static MonoScriptPropertyDrawer()
{
m_ScriptCache = new Dictionary<string, MonoScript>();
var scripts = Resources.FindObjectsOfTypeAll<MonoScript>();
MonoScript[] scripts = Resources.FindObjectsOfTypeAll<MonoScript>();
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))
{
m_ScriptCache.Add(type.FullName, scripts[i]);
@@ -84,7 +85,7 @@ namespace Ext.B83.Unity.Editor.PropertyDrawers
{
if (script != null)
{
var type = script.GetClass();
Type type = script.GetClass();
MonoScriptAttribute attr = (MonoScriptAttribute)attribute;
if (attr.type != null && !attr.type.IsAssignableFrom(type))
type = null;

View File

@@ -75,7 +75,7 @@ namespace InterfaceOff
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.SetAttachedTo(windowBase);
@@ -88,8 +88,8 @@ namespace InterfaceOff
if (AutoSpawn)
{
const int TICKS_PER_SECOND = 20;
const int MINIMUM_SPAWN_TIME = 2 * 20;
const int MAXIMUM_SPAWN_TIME = 5 * 20;
const int MINIMUM_SPAWN_TIME = 2 * TICKS_PER_SECOND;
const int MAXIMUM_SPAWN_TIME = 5 * TICKS_PER_SECOND;
/* Decreases the spawn counter and spawns if at 0 */
SpawnCounter = Math.Max(0, SpawnCounter - 1);