From 73282fbdef58fcf21128935c901efaaadb4dc6b0 Mon Sep 17 00:00:00 2001 From: zxl Date: Fri, 8 Nov 2024 09:12:53 +0800 Subject: [PATCH 1/3] =?UTF-8?q?mod=EF=BC=9A=E4=BF=AE=E6=94=B9playerbase?= =?UTF-8?q?=E7=9A=84=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{ => DemoGame/GameScript/Loader/MonoBehaviour}/PlayerBase.cs | 0 .../GameScript/Loader/MonoBehaviour}/PlayerBase.cs.meta | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename Assets/{ => DemoGame/GameScript/Loader/MonoBehaviour}/PlayerBase.cs (100%) rename Assets/{ => DemoGame/GameScript/Loader/MonoBehaviour}/PlayerBase.cs.meta (100%) diff --git a/Assets/PlayerBase.cs b/Assets/DemoGame/GameScript/Loader/MonoBehaviour/PlayerBase.cs similarity index 100% rename from Assets/PlayerBase.cs rename to Assets/DemoGame/GameScript/Loader/MonoBehaviour/PlayerBase.cs diff --git a/Assets/PlayerBase.cs.meta b/Assets/DemoGame/GameScript/Loader/MonoBehaviour/PlayerBase.cs.meta similarity index 100% rename from Assets/PlayerBase.cs.meta rename to Assets/DemoGame/GameScript/Loader/MonoBehaviour/PlayerBase.cs.meta -- 2.25.1 From 958d5d48aa36ac842ae0787c520fd75aef227238 Mon Sep 17 00:00:00 2001 From: zxl Date: Fri, 8 Nov 2024 11:05:33 +0800 Subject: [PATCH 2/3] =?UTF-8?q?mod=EF=BC=9A=E7=BB=93=E6=9E=84=E5=A4=A7?= =?UTF-8?q?=E6=94=B9=EF=BC=8C=E6=B7=B1=E5=BA=A6=E7=BB=91=E5=AE=9AUnity?= =?UTF-8?q?=EF=BC=9B=E5=AE=8C=E6=88=90=E5=88=9D=E6=AD=A5=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 5 +- .../GameRes/UIPanel/UIAnalysisReport.prefab | 13 +++ .../DemoGame/GameRes/UIPanel/UIAnswer.prefab | 13 +++ .../GameRes/UIPanel/UIBasicInformation.prefab | 13 +++ .../DemoGame/GameRes/UIPanel/UIBigTips.prefab | 13 +++ .../DemoGame/GameRes/UIPanel/UIBlack.prefab | 13 +++ .../GameRes/UIPanel/UIDialogue.prefab | 13 +++ .../GameRes/UIPanel/UIIntroduce.prefab | 13 +++ .../DemoGame/GameRes/UIPanel/UILoading.prefab | 13 +++ Assets/DemoGame/GameRes/UIPanel/UIMain.prefab | 15 ++- .../DemoGame/GameRes/UIPanel/UIMinTips.prefab | 13 +++ .../GameRes/UIPanel/UITaskList.prefab | 13 +++ .../Hotfix/EventArgs/TestEventArgs.cs | 3 +- .../Hotfix/EventArgs/UIHideOrShowEventArgs.cs | 67 +++++++++++ .../EventArgs/UIHideOrShowEventArgs.cs.meta | 3 + .../Hotfix/FloorBase/GameObjectBase.cs | 27 ++--- .../DemoGame/GameScript/Hotfix/GameEntry.cs | 14 --- .../GameScript/Hotfix/GameEntry.cs.meta | 3 - .../Logic/GameSceneLogicProcedure.cs | 5 +- .../Logic/LoadingGameSceneProcedure.cs | 3 +- .../Hotfix/Res/ResourcesLocalComponent.cs | 3 +- .../Hotfix/UI/Logic/AnalysisReportUI.cs | 2 +- .../GameScript/Hotfix/UI/Logic/DialogueUI.cs | 2 +- .../GameScript/Hotfix/UI/Logic/GameUI.cs | 1 - .../GameScript/Hotfix/UI/Logic/IntroduceUI.cs | 2 +- .../GameScript/Hotfix/UI/Logic/MainUI.cs | 3 +- .../GameScript/Hotfix/UI/Logic/MinTipsUI.cs | 2 +- Assets/DemoGame/GameScript/Hotfix/ZCGame.cs | 104 ------------------ .../DemoGame/GameScript/Hotfix/ZCGame.cs.meta | 3 - .../Loader/Event/Args/DeleteModelEventArgs.cs | 2 +- .../Args/DownloadProgressUpdateEventArgs.cs | 2 +- .../Event/Args/EnterSingleModeEventArgs.cs | 2 +- .../Loader/Event/Args/GameEventArgs.cs | 2 +- .../Event/Args/GameInitFinishEventArgs.cs | 2 +- .../Loader/Event/Args/LoadModelEventArgs.cs | 2 +- .../Args/LoadingGameSceneFinishEventArgs.cs | 2 +- .../Args/UpdatePackageCallbackEventArgs.cs | 2 +- .../GameScript/Loader/Event/EventManager.cs | 2 +- .../GameScript/Loader/Event/IEventManager.cs | 2 +- Assets/DemoGame/GameScript/Loader/Global.cs | 40 +++++-- .../Loader/Res/InitializePackage.cs | 2 +- .../GameScript/Loader/UI/UILoading.cs | 2 +- 42 files changed, 280 insertions(+), 181 deletions(-) create mode 100644 Assets/DemoGame/GameScript/Hotfix/EventArgs/UIHideOrShowEventArgs.cs create mode 100644 Assets/DemoGame/GameScript/Hotfix/EventArgs/UIHideOrShowEventArgs.cs.meta delete mode 100644 Assets/DemoGame/GameScript/Hotfix/GameEntry.cs delete mode 100644 Assets/DemoGame/GameScript/Hotfix/GameEntry.cs.meta delete mode 100644 Assets/DemoGame/GameScript/Hotfix/ZCGame.cs delete mode 100644 Assets/DemoGame/GameScript/Hotfix/ZCGame.cs.meta diff --git a/.gitignore b/.gitignore index 25bd5fa..f6f0e41 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ _ReSharper.CSharp/ ~$*.xlsx.meta #Unity相关目录 +*.sln .gradle Bundles Library @@ -20,11 +21,10 @@ Logs UserSettings *.csproj *.vsconfig -ProjectSettings/RiderScriptEditorPersistedState.asset HybridCLRData Builds ProjectSettings -/ProjectSettings +Packages #Unity/Assets Unity/Assets/DemoGame/GameRes/Codes/ @@ -43,4 +43,3 @@ obj/ Temp/ yoo /Assets/DemoGame/GameScript/Hotfix/Generate -*.sln diff --git a/Assets/DemoGame/GameRes/UIPanel/UIAnalysisReport.prefab b/Assets/DemoGame/GameRes/UIPanel/UIAnalysisReport.prefab index f3df768..4f3f9bd 100644 --- a/Assets/DemoGame/GameRes/UIPanel/UIAnalysisReport.prefab +++ b/Assets/DemoGame/GameRes/UIPanel/UIAnalysisReport.prefab @@ -374,6 +374,7 @@ GameObject: - component: {fileID: 4142826567245113225} - component: {fileID: 446002385128238495} - component: {fileID: 8769046888857752082} + - component: {fileID: 2800259146936183769} m_Layer: 5 m_Name: UIAnalysisReport m_TagString: Untagged @@ -462,6 +463,18 @@ MonoBehaviour: go: {fileID: 3629523032732396268} - name: btn_Close go: {fileID: 2697064222727683036} +--- !u!114 &2800259146936183769 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4142826567245113227} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: bbbe8e7dd2a14e8e883c315c6548fadc, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &5317604574928387220 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/DemoGame/GameRes/UIPanel/UIAnswer.prefab b/Assets/DemoGame/GameRes/UIPanel/UIAnswer.prefab index d1fe36c..aaf2f4e 100644 --- a/Assets/DemoGame/GameRes/UIPanel/UIAnswer.prefab +++ b/Assets/DemoGame/GameRes/UIPanel/UIAnswer.prefab @@ -259,6 +259,7 @@ GameObject: - component: {fileID: 698078448984834475} - component: {fileID: 668918620521492242} - component: {fileID: 9115275115095225745} + - component: {fileID: 2279161542270385328} m_Layer: 5 m_Name: UIAnswer m_TagString: Untagged @@ -372,6 +373,18 @@ MonoBehaviour: go: {fileID: 9202602478924319093} - name: btn_Finish go: {fileID: 5820743778285733619} +--- !u!114 &2279161542270385328 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 756482867217720017} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6671bdd083df41728c3ff3db6378756f, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &1024254765518223612 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/DemoGame/GameRes/UIPanel/UIBasicInformation.prefab b/Assets/DemoGame/GameRes/UIPanel/UIBasicInformation.prefab index 89ddf03..ae9b3c8 100644 --- a/Assets/DemoGame/GameRes/UIPanel/UIBasicInformation.prefab +++ b/Assets/DemoGame/GameRes/UIPanel/UIBasicInformation.prefab @@ -500,6 +500,7 @@ GameObject: - component: {fileID: 550302411564123129} - component: {fileID: 291995725713535194} - component: {fileID: -8407002671156803367} + - component: {fileID: -9131199328991421552} m_Layer: 5 m_Name: UIBasicInformation m_TagString: Untagged @@ -593,6 +594,18 @@ MonoBehaviour: go: {fileID: 3249870284026512454} - name: txt_Tips go: {fileID: 4912361159165114271} +--- !u!114 &-9131199328991421552 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3397518291152337347} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 74f502e15a4a4b7395115b6a9ffcad28, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &4001767378608646931 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/DemoGame/GameRes/UIPanel/UIBigTips.prefab b/Assets/DemoGame/GameRes/UIPanel/UIBigTips.prefab index b043993..9917aae 100644 --- a/Assets/DemoGame/GameRes/UIPanel/UIBigTips.prefab +++ b/Assets/DemoGame/GameRes/UIPanel/UIBigTips.prefab @@ -146,6 +146,7 @@ GameObject: - component: {fileID: 4142826567245113225} - component: {fileID: 446002385128238495} - component: {fileID: 8769046888857752082} + - component: {fileID: -985440187916247387} m_Layer: 5 m_Name: UIBigTips m_TagString: Untagged @@ -228,6 +229,18 @@ MonoBehaviour: Datas: - name: txt_Tips go: {fileID: 3399441290911741623} +--- !u!114 &-985440187916247387 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4142826567245113227} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8092e0a6ecd1401bad5f73c247b49aa5, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &6714752182229787685 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/DemoGame/GameRes/UIPanel/UIBlack.prefab b/Assets/DemoGame/GameRes/UIPanel/UIBlack.prefab index aec7a61..43f1908 100644 --- a/Assets/DemoGame/GameRes/UIPanel/UIBlack.prefab +++ b/Assets/DemoGame/GameRes/UIPanel/UIBlack.prefab @@ -87,6 +87,7 @@ GameObject: - component: {fileID: 4142826567245113225} - component: {fileID: 446002385128238495} - component: {fileID: 8769046888857752082} + - component: {fileID: -1151308275079064170} m_Layer: 5 m_Name: UIBlack m_TagString: Untagged @@ -175,3 +176,15 @@ MonoBehaviour: go: {fileID: 0} - name: txt_Score go: {fileID: 0} +--- !u!114 &-1151308275079064170 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4142826567245113227} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dd9abc3083384dc5a310404193297e5c, type: 3} + m_Name: + m_EditorClassIdentifier: diff --git a/Assets/DemoGame/GameRes/UIPanel/UIDialogue.prefab b/Assets/DemoGame/GameRes/UIPanel/UIDialogue.prefab index 31b2121..9245487 100644 --- a/Assets/DemoGame/GameRes/UIPanel/UIDialogue.prefab +++ b/Assets/DemoGame/GameRes/UIPanel/UIDialogue.prefab @@ -490,6 +490,7 @@ GameObject: - component: {fileID: 4142826567245113225} - component: {fileID: 446002385128238495} - component: {fileID: 8769046888857752082} + - component: {fileID: -4724590772860326454} m_Layer: 5 m_Name: UIDialogue m_TagString: Untagged @@ -576,6 +577,18 @@ MonoBehaviour: go: {fileID: 683421145250387970} - name: btn_Close go: {fileID: 1392729977172397} +--- !u!114 &-4724590772860326454 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4142826567245113227} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 47c41230b1874478bbbe83c3db07af2d, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &6455988744588681074 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/DemoGame/GameRes/UIPanel/UIIntroduce.prefab b/Assets/DemoGame/GameRes/UIPanel/UIIntroduce.prefab index 0ceffc2..2ee6d30 100644 --- a/Assets/DemoGame/GameRes/UIPanel/UIIntroduce.prefab +++ b/Assets/DemoGame/GameRes/UIPanel/UIIntroduce.prefab @@ -490,6 +490,7 @@ GameObject: - component: {fileID: 4142826567245113225} - component: {fileID: 446002385128238495} - component: {fileID: 8769046888857752082} + - component: {fileID: -1210113770028888665} m_Layer: 5 m_Name: UIIntroduce m_TagString: Untagged @@ -576,6 +577,18 @@ MonoBehaviour: go: {fileID: 683421145250387970} - name: btn_Close go: {fileID: 1392729977172397} +--- !u!114 &-1210113770028888665 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4142826567245113227} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: feafec9a827447d589afa0c665de32a0, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &6455988744588681074 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/DemoGame/GameRes/UIPanel/UILoading.prefab b/Assets/DemoGame/GameRes/UIPanel/UILoading.prefab index 51fa4bc..36584d1 100644 --- a/Assets/DemoGame/GameRes/UIPanel/UILoading.prefab +++ b/Assets/DemoGame/GameRes/UIPanel/UILoading.prefab @@ -166,6 +166,7 @@ GameObject: - component: {fileID: 4142826567245113225} - component: {fileID: 446002385128238495} - component: {fileID: 248032507418089783} + - component: {fileID: -3171479879712486959} m_Layer: 5 m_Name: UILoading m_TagString: Untagged @@ -247,3 +248,15 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: Datas: [] +--- !u!114 &-3171479879712486959 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4142826567245113227} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1d9c1bdf5bce4e559542978292cf76c5, type: 3} + m_Name: + m_EditorClassIdentifier: diff --git a/Assets/DemoGame/GameRes/UIPanel/UIMain.prefab b/Assets/DemoGame/GameRes/UIPanel/UIMain.prefab index de1dd49..2a858c8 100644 --- a/Assets/DemoGame/GameRes/UIPanel/UIMain.prefab +++ b/Assets/DemoGame/GameRes/UIPanel/UIMain.prefab @@ -427,6 +427,7 @@ GameObject: - component: {fileID: 4142826567245113225} - component: {fileID: 446002385128238495} - component: {fileID: 8769046888857752082} + - component: {fileID: 950412098625172911} m_Layer: 5 m_Name: UIMain m_TagString: Untagged @@ -512,12 +513,24 @@ MonoBehaviour: Datas: - name: btn_Start go: {fileID: 5311715019834057590} - - name: txt_Score + - name: txt_Time go: {fileID: 7341890073962984069} - name: txt_Progress go: {fileID: 2605278743245872664} - name: txt_Score go: {fileID: 5876990461323761607} +--- !u!114 &950412098625172911 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4142826567245113227} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1aa25c2c4db4499db3e86b30518ea692, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &4804850453455257046 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/DemoGame/GameRes/UIPanel/UIMinTips.prefab b/Assets/DemoGame/GameRes/UIPanel/UIMinTips.prefab index 12fef62..1f0d938 100644 --- a/Assets/DemoGame/GameRes/UIPanel/UIMinTips.prefab +++ b/Assets/DemoGame/GameRes/UIPanel/UIMinTips.prefab @@ -490,6 +490,7 @@ GameObject: - component: {fileID: 4142826567245113225} - component: {fileID: 446002385128238495} - component: {fileID: 8769046888857752082} + - component: {fileID: 6551479780972282114} m_Layer: 5 m_Name: UIMinTips m_TagString: Untagged @@ -576,6 +577,18 @@ MonoBehaviour: go: {fileID: 683421145250387970} - name: btn_Close go: {fileID: 1392729977172397} +--- !u!114 &6551479780972282114 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4142826567245113227} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f3a6ff210a2c4f5098ef1a728f5021dd, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &6455988744588681074 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/DemoGame/GameRes/UIPanel/UITaskList.prefab b/Assets/DemoGame/GameRes/UIPanel/UITaskList.prefab index f372eb8..a907994 100644 --- a/Assets/DemoGame/GameRes/UIPanel/UITaskList.prefab +++ b/Assets/DemoGame/GameRes/UIPanel/UITaskList.prefab @@ -500,6 +500,7 @@ GameObject: - component: {fileID: 550302411564123129} - component: {fileID: 291995725713535194} - component: {fileID: -8407002671156803367} + - component: {fileID: 6085230108405065134} m_Layer: 5 m_Name: UITaskList m_TagString: Untagged @@ -592,6 +593,18 @@ MonoBehaviour: go: {fileID: 3249870284026512454} - name: txt_Tips go: {fileID: 0} +--- !u!114 &6085230108405065134 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3397518291152337347} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8bdfce83cded4259bdd1b1ad0d38590a, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &4001767378608646931 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/DemoGame/GameScript/Hotfix/EventArgs/TestEventArgs.cs b/Assets/DemoGame/GameScript/Hotfix/EventArgs/TestEventArgs.cs index e29fac1..0e7ac4e 100644 --- a/Assets/DemoGame/GameScript/Hotfix/EventArgs/TestEventArgs.cs +++ b/Assets/DemoGame/GameScript/Hotfix/EventArgs/TestEventArgs.cs @@ -1,5 +1,4 @@ -using ZGame; - + namespace ZC { public class TestEventArgs : GameEventArgs diff --git a/Assets/DemoGame/GameScript/Hotfix/EventArgs/UIHideOrShowEventArgs.cs b/Assets/DemoGame/GameScript/Hotfix/EventArgs/UIHideOrShowEventArgs.cs new file mode 100644 index 0000000..6b24ed3 --- /dev/null +++ b/Assets/DemoGame/GameScript/Hotfix/EventArgs/UIHideOrShowEventArgs.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; + +namespace ZC +{ + public class UIHideOrShowEventArgs : GameEventArgs + { + public static readonly int EventId = typeof(UIHideOrShowEventArgs).GetHashCode(); + public override int Id => EventId; + public UIType UIType; + + public UIHideOrShowEventArgs(UIType uiType) + { + UIType = uiType; + } + } + + public static class GameEventPool + { + private static Dictionary> pool = new Dictionary>(); + private static Dictionary> cache = new Dictionary>(); + + public static T TakeOut() where T : GameEventArgs, new() + { + string name = nameof(T); + T args; + if (pool.TryGetValue(name, out var list) && list.Count > 0) + { + args = (T)list[0]; + list.RemoveAt(0); + } + else + { + args = new T(); + } + + AddCache(name, args); + return args; + } + + public static void Put(T args) where T : GameEventArgs + { + string name = nameof(T); + if (cache.TryGetValue(name, out var list)) + { + list.Remove(args); + AddPool(name, args); + } + else + { + throw new NullReferenceException(); + } + } + + static void AddCache(string name, GameEventArgs args) + { + if (cache.TryGetValue(name, out var list)) list.Add(args); + else cache.Add(name, new List() { args }); + } + + static void AddPool(string name, GameEventArgs args) + { + if (pool.TryGetValue(name, out var list)) list.Add(args); + else pool.Add(name, new List() { args }); + } + } +} \ No newline at end of file diff --git a/Assets/DemoGame/GameScript/Hotfix/EventArgs/UIHideOrShowEventArgs.cs.meta b/Assets/DemoGame/GameScript/Hotfix/EventArgs/UIHideOrShowEventArgs.cs.meta new file mode 100644 index 0000000..2784e9c --- /dev/null +++ b/Assets/DemoGame/GameScript/Hotfix/EventArgs/UIHideOrShowEventArgs.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 7e14e6d6332c4e8b8fd480d7731b0f2f +timeCreated: 1731031488 \ No newline at end of file diff --git a/Assets/DemoGame/GameScript/Hotfix/FloorBase/GameObjectBase.cs b/Assets/DemoGame/GameScript/Hotfix/FloorBase/GameObjectBase.cs index 7b5745b..3ed89bc 100644 --- a/Assets/DemoGame/GameScript/Hotfix/FloorBase/GameObjectBase.cs +++ b/Assets/DemoGame/GameScript/Hotfix/FloorBase/GameObjectBase.cs @@ -1,8 +1,9 @@ -using UnityEngine; +using System; +using UnityEngine; namespace ZC { - public class GameObjectBase : IBehaviour, ICreateBindingGo + public class GameObjectBase : MonoBehaviour, IBehaviour //, ICreateBindingGo { private GameObject _go; private long _id; @@ -16,26 +17,20 @@ namespace ZC public bool isPause => this._isPause; - protected GameObjectBase(GameObject go = null) + #region mono + + private void Awake() { - this._id = IDGenerator.Generate(); - Debug.Log($"name is {typeof(T)}, id is {this._id}"); - if (go == null) - { - var name = typeof(T).FullName; - this._go = new GameObject(name); - _go.transform.SetParent(ZCGame.ObjectPool); - this._go.name = name; - } - else - this._go = go; + OnInit(); } - public void SetGo(GameObject go) + private void OnDestroy() { - this._go = go; + OnDispose(); } + #endregion + public virtual void OnInit() { this._isDisposed = false; diff --git a/Assets/DemoGame/GameScript/Hotfix/GameEntry.cs b/Assets/DemoGame/GameScript/Hotfix/GameEntry.cs deleted file mode 100644 index dfe4a4d..0000000 --- a/Assets/DemoGame/GameScript/Hotfix/GameEntry.cs +++ /dev/null @@ -1,14 +0,0 @@ -using UnityEngine; -using YooAsset; - -namespace ZC -{ - public class GameEntry - { - public static void Init(GameObject go, EPlayMode playMode) - { - Debug.Log("热更成功了"); - ZCGame zcGame = new ZCGame(go); - } - } -} \ No newline at end of file diff --git a/Assets/DemoGame/GameScript/Hotfix/GameEntry.cs.meta b/Assets/DemoGame/GameScript/Hotfix/GameEntry.cs.meta deleted file mode 100644 index f2b34d6..0000000 --- a/Assets/DemoGame/GameScript/Hotfix/GameEntry.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 91d311a248764f499955c2ea204a53b8 -timeCreated: 1720680742 \ No newline at end of file diff --git a/Assets/DemoGame/GameScript/Hotfix/Procedure/Logic/GameSceneLogicProcedure.cs b/Assets/DemoGame/GameScript/Hotfix/Procedure/Logic/GameSceneLogicProcedure.cs index a00d320..2904750 100644 --- a/Assets/DemoGame/GameScript/Hotfix/Procedure/Logic/GameSceneLogicProcedure.cs +++ b/Assets/DemoGame/GameScript/Hotfix/Procedure/Logic/GameSceneLogicProcedure.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; +using Unity.Loader; using UnityEngine; -using ZGame; namespace ZC { @@ -17,7 +17,7 @@ namespace ZC EventManager.Instance.Subscribe(DeleteModelEventArgs.EventId, this.DeleteModelEvent); testZhongLi = new TestZhongLi(); - ZCGame.ObjectManager.Add(testZhongLi); + // Global.ObjectManager.Add(testZhongLi); } private void DeleteModelEvent(object sender, GameEventArgs e) @@ -49,7 +49,6 @@ namespace ZC base.Dispose(); EventManager.Instance.Unsubscribe(LoadModelEventArgs.EventId, this.LoadModelEvent); EventManager.Instance.Unsubscribe(DeleteModelEventArgs.EventId, this.DeleteModelEvent); - ZCGame.ObjectManager.Remove(this.testZhongLi.Id); } public override void OnEnter() diff --git a/Assets/DemoGame/GameScript/Hotfix/Procedure/Logic/LoadingGameSceneProcedure.cs b/Assets/DemoGame/GameScript/Hotfix/Procedure/Logic/LoadingGameSceneProcedure.cs index dd02549..09bf5b2 100644 --- a/Assets/DemoGame/GameScript/Hotfix/Procedure/Logic/LoadingGameSceneProcedure.cs +++ b/Assets/DemoGame/GameScript/Hotfix/Procedure/Logic/LoadingGameSceneProcedure.cs @@ -1,4 +1,5 @@ using Cysharp.Threading.Tasks; +using Unity.Loader; using UnityEngine; namespace ZC @@ -17,7 +18,7 @@ namespace ZC Debug.Log("加载的是:" + loadAssetAsync); // ZCGame.ProcedureManager.ChangeProcedure(ProcedureType.GameSceneLogicProcedure); - ZCGame.UIManager.CreateUI(UIType.MainUI, AssetConst.Assets_DemoGame_GameRes_UIPanel_UIMain_prefab, UILayer.High); + Global.UIManager.CreateUI(UIType.MainUI, AssetConst.Assets_DemoGame_GameRes_UIPanel_UIMain_prefab, UILayer.High); }).Forget(); } diff --git a/Assets/DemoGame/GameScript/Hotfix/Res/ResourcesLocalComponent.cs b/Assets/DemoGame/GameScript/Hotfix/Res/ResourcesLocalComponent.cs index bc71595..25015c0 100644 --- a/Assets/DemoGame/GameScript/Hotfix/Res/ResourcesLocalComponent.cs +++ b/Assets/DemoGame/GameScript/Hotfix/Res/ResourcesLocalComponent.cs @@ -1,5 +1,6 @@ using System; using Cysharp.Threading.Tasks; +using Unity.Loader; using UnityEngine; using UnityEngine.SceneManagement; using YooAsset; @@ -45,7 +46,7 @@ namespace ZC public ResourcesLocalComponent() { resourcePackage = YooAssets.GetPackage("DefaultPackage"); - var transform = ZCGame.Self.transform; + var transform = Global.Self.transform; Min = transform.Find("UI/UICanvas/Min"); Low = transform.Find("UI/UICanvas/Low"); diff --git a/Assets/DemoGame/GameScript/Hotfix/UI/Logic/AnalysisReportUI.cs b/Assets/DemoGame/GameScript/Hotfix/UI/Logic/AnalysisReportUI.cs index 9501e91..3317900 100644 --- a/Assets/DemoGame/GameScript/Hotfix/UI/Logic/AnalysisReportUI.cs +++ b/Assets/DemoGame/GameScript/Hotfix/UI/Logic/AnalysisReportUI.cs @@ -27,7 +27,7 @@ namespace ZC private void ClickClose() { - ZCGame.UIManager.HideUI(UIType.AnalysisReportUI); + EventManager.Instance.FireNow(this, new UIHideOrShowEventArgs(UIType.AnalysisReportUI)); closeAction?.Invoke(); closeAction = null; } diff --git a/Assets/DemoGame/GameScript/Hotfix/UI/Logic/DialogueUI.cs b/Assets/DemoGame/GameScript/Hotfix/UI/Logic/DialogueUI.cs index cfaf72f..050da6d 100644 --- a/Assets/DemoGame/GameScript/Hotfix/UI/Logic/DialogueUI.cs +++ b/Assets/DemoGame/GameScript/Hotfix/UI/Logic/DialogueUI.cs @@ -31,7 +31,7 @@ namespace ZC private void ClickClose() { - ZCGame.UIManager.HideUI(UIType.DialogueUI); + EventManager.Instance.FireNow(this, new UIHideOrShowEventArgs(UIType.DialogueUI)); callback?.Invoke(); callback = null; } diff --git a/Assets/DemoGame/GameScript/Hotfix/UI/Logic/GameUI.cs b/Assets/DemoGame/GameScript/Hotfix/UI/Logic/GameUI.cs index a6fcf6f..9fa993c 100644 --- a/Assets/DemoGame/GameScript/Hotfix/UI/Logic/GameUI.cs +++ b/Assets/DemoGame/GameScript/Hotfix/UI/Logic/GameUI.cs @@ -1,5 +1,4 @@ using UnityEngine.UI; -using ZGame; namespace ZC { diff --git a/Assets/DemoGame/GameScript/Hotfix/UI/Logic/IntroduceUI.cs b/Assets/DemoGame/GameScript/Hotfix/UI/Logic/IntroduceUI.cs index dd42102..81de4c1 100644 --- a/Assets/DemoGame/GameScript/Hotfix/UI/Logic/IntroduceUI.cs +++ b/Assets/DemoGame/GameScript/Hotfix/UI/Logic/IntroduceUI.cs @@ -25,7 +25,7 @@ namespace ZC private void ClickClose() { - ZCGame.UIManager.HideUI(UIType.IntroduceUI); + EventManager.Instance.FireNow(this, new UIHideOrShowEventArgs(UIType.IntroduceUI)); closeAction?.Invoke(); closeAction = null; } diff --git a/Assets/DemoGame/GameScript/Hotfix/UI/Logic/MainUI.cs b/Assets/DemoGame/GameScript/Hotfix/UI/Logic/MainUI.cs index c20f2e4..2ebd508 100644 --- a/Assets/DemoGame/GameScript/Hotfix/UI/Logic/MainUI.cs +++ b/Assets/DemoGame/GameScript/Hotfix/UI/Logic/MainUI.cs @@ -12,7 +12,7 @@ namespace ZC private TMP_Text txt_Score; private TMP_Text txt_Progress; private TMP_Text txt_Time; - + public override void Init() { base.Init(); @@ -25,6 +25,7 @@ namespace ZC Global.updateTime += UpdateTime; Global.updateScore += UpdateScore; Global.updateProgress += UpdateProgress; + UpdateTime(String.Empty); } private void UpdateTime(string obj) diff --git a/Assets/DemoGame/GameScript/Hotfix/UI/Logic/MinTipsUI.cs b/Assets/DemoGame/GameScript/Hotfix/UI/Logic/MinTipsUI.cs index b1f4b00..23460b3 100644 --- a/Assets/DemoGame/GameScript/Hotfix/UI/Logic/MinTipsUI.cs +++ b/Assets/DemoGame/GameScript/Hotfix/UI/Logic/MinTipsUI.cs @@ -24,7 +24,7 @@ namespace ZC private void ClickClose() { - ZCGame.UIManager.HideUI(UIType.IntroduceUI); + EventManager.Instance.FireNow(this, new UIHideOrShowEventArgs(UIType.MinTipsUI)); closeAction?.Invoke(); closeAction = null; } diff --git a/Assets/DemoGame/GameScript/Hotfix/ZCGame.cs b/Assets/DemoGame/GameScript/Hotfix/ZCGame.cs deleted file mode 100644 index f664b14..0000000 --- a/Assets/DemoGame/GameScript/Hotfix/ZCGame.cs +++ /dev/null @@ -1,104 +0,0 @@ -using Cysharp.Threading.Tasks; -using UnityEngine; - -namespace ZC -{ - public class ZCGame - { - private GameObject _self; - private Transform _objectPool; - private bool isDisposed; - private bool isPause; - private float gameTime; - - public static ZCGame _zcGame; - private ObjectManager _objectManager; - private UIManager _uiManager; - private ProcedureManager _procedureManager; - private ResourcesLocalComponent _resourcesLocalComponent; - - public static GameObject Self => _zcGame._self; - public static Transform ObjectPool => _zcGame._objectPool; - public static float GameTime => _zcGame.gameTime; - - public static IObjectManager ObjectManager => _zcGame._objectManager; - public static IUIManager UIManager => _zcGame._uiManager; - public static IProcedureManager ProcedureManager => _zcGame._procedureManager; - public static IResourcesLocalComponent ResourcesLocalComponent => _zcGame._resourcesLocalComponent; - - public ZCGame(GameObject self) - { - _zcGame = this; - this._self = self; - this._objectPool = self.transform.Find("ObjectPool"); - this.isDisposed = false; - this.isPause = false; - - AssemblyManager.Initialize(); - - this.UpdateGame().Forget(); - } - - async UniTask UpdateGame() - { - this.Init(); - while (!this.isDisposed) - { - await UniTask.Yield(); - if (!Application.isPlaying) // 关闭应用的时候自动调用 - { - this.isDisposed = true; - this.Dispose(); - break; - } - - if (this.isPause) continue; - - this.gameTime += Time.fixedTime; - this.Update(this.gameTime); - this.LateUpdate(this.gameTime); - } - } - - public void Pause() - { - this.isPause = true; - } - - public void Resume() - { - this.isPause = false; - } - - void Init() - { - this._objectManager = new ObjectManager(); - this._objectManager.OnInit(); - - this._uiManager = new UIManager(); - this._procedureManager = new ProcedureManager(); - this._resourcesLocalComponent = new ResourcesLocalComponent(); - - this._objectManager.Add(this._uiManager); - this._objectManager.Add(this._procedureManager); - - this._procedureManager.ChangeProcedure(ProcedureType.LoadingGameSceneProcedure); - } - - void Update(float time) - { - this._objectManager.OnUpdate(time); - } - - void LateUpdate(float time) - { - } - - void Dispose() - { - this._objectManager.OnDispose(); - _resourcesLocalComponent.Dispose(); - Debug.Log("关闭应用了"); - } - } -} \ No newline at end of file diff --git a/Assets/DemoGame/GameScript/Hotfix/ZCGame.cs.meta b/Assets/DemoGame/GameScript/Hotfix/ZCGame.cs.meta deleted file mode 100644 index 9a199f1..0000000 --- a/Assets/DemoGame/GameScript/Hotfix/ZCGame.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 3f38ff28c125416bbedbbdd0b168fde2 -timeCreated: 1720688289 \ No newline at end of file diff --git a/Assets/DemoGame/GameScript/Loader/Event/Args/DeleteModelEventArgs.cs b/Assets/DemoGame/GameScript/Loader/Event/Args/DeleteModelEventArgs.cs index 6c837fd..8fd6fa3 100644 --- a/Assets/DemoGame/GameScript/Loader/Event/Args/DeleteModelEventArgs.cs +++ b/Assets/DemoGame/GameScript/Loader/Event/Args/DeleteModelEventArgs.cs @@ -1,4 +1,4 @@ -namespace ZGame +namespace ZC { public class DeleteModelEventArgs : GameEventArgs { diff --git a/Assets/DemoGame/GameScript/Loader/Event/Args/DownloadProgressUpdateEventArgs.cs b/Assets/DemoGame/GameScript/Loader/Event/Args/DownloadProgressUpdateEventArgs.cs index a77d972..17cc596 100644 --- a/Assets/DemoGame/GameScript/Loader/Event/Args/DownloadProgressUpdateEventArgs.cs +++ b/Assets/DemoGame/GameScript/Loader/Event/Args/DownloadProgressUpdateEventArgs.cs @@ -1,4 +1,4 @@ -namespace ZGame +namespace ZC { /// /// 补丁包初始化失败 diff --git a/Assets/DemoGame/GameScript/Loader/Event/Args/EnterSingleModeEventArgs.cs b/Assets/DemoGame/GameScript/Loader/Event/Args/EnterSingleModeEventArgs.cs index 8da0126..a766d37 100644 --- a/Assets/DemoGame/GameScript/Loader/Event/Args/EnterSingleModeEventArgs.cs +++ b/Assets/DemoGame/GameScript/Loader/Event/Args/EnterSingleModeEventArgs.cs @@ -1,4 +1,4 @@ -namespace ZGame +namespace ZC { public class EnterSingleModeEventArgs : GameEventArgs { diff --git a/Assets/DemoGame/GameScript/Loader/Event/Args/GameEventArgs.cs b/Assets/DemoGame/GameScript/Loader/Event/Args/GameEventArgs.cs index c79a985..5a69ab7 100644 --- a/Assets/DemoGame/GameScript/Loader/Event/Args/GameEventArgs.cs +++ b/Assets/DemoGame/GameScript/Loader/Event/Args/GameEventArgs.cs @@ -1,6 +1,6 @@ using System; -namespace ZGame +namespace ZC { /// /// 游戏逻辑事件基类。 diff --git a/Assets/DemoGame/GameScript/Loader/Event/Args/GameInitFinishEventArgs.cs b/Assets/DemoGame/GameScript/Loader/Event/Args/GameInitFinishEventArgs.cs index 17c24ef..6c0000b 100644 --- a/Assets/DemoGame/GameScript/Loader/Event/Args/GameInitFinishEventArgs.cs +++ b/Assets/DemoGame/GameScript/Loader/Event/Args/GameInitFinishEventArgs.cs @@ -1,4 +1,4 @@ -namespace ZGame +namespace ZC { /// /// game初始化完成(资源、ui等初始化完成) diff --git a/Assets/DemoGame/GameScript/Loader/Event/Args/LoadModelEventArgs.cs b/Assets/DemoGame/GameScript/Loader/Event/Args/LoadModelEventArgs.cs index bc47151..980ab3f 100644 --- a/Assets/DemoGame/GameScript/Loader/Event/Args/LoadModelEventArgs.cs +++ b/Assets/DemoGame/GameScript/Loader/Event/Args/LoadModelEventArgs.cs @@ -1,4 +1,4 @@ -namespace ZGame +namespace ZC { public class LoadModelEventArgs : GameEventArgs { diff --git a/Assets/DemoGame/GameScript/Loader/Event/Args/LoadingGameSceneFinishEventArgs.cs b/Assets/DemoGame/GameScript/Loader/Event/Args/LoadingGameSceneFinishEventArgs.cs index 11ad8de..adeb17c 100644 --- a/Assets/DemoGame/GameScript/Loader/Event/Args/LoadingGameSceneFinishEventArgs.cs +++ b/Assets/DemoGame/GameScript/Loader/Event/Args/LoadingGameSceneFinishEventArgs.cs @@ -1,4 +1,4 @@ -namespace ZGame +namespace ZC { public class LoadingGameSceneFinishEventArgs : GameEventArgs { diff --git a/Assets/DemoGame/GameScript/Loader/Event/Args/UpdatePackageCallbackEventArgs.cs b/Assets/DemoGame/GameScript/Loader/Event/Args/UpdatePackageCallbackEventArgs.cs index 16d4530..7b323c3 100644 --- a/Assets/DemoGame/GameScript/Loader/Event/Args/UpdatePackageCallbackEventArgs.cs +++ b/Assets/DemoGame/GameScript/Loader/Event/Args/UpdatePackageCallbackEventArgs.cs @@ -1,4 +1,4 @@ -namespace ZGame +namespace ZC { public enum UpdatePackageCallbackType { diff --git a/Assets/DemoGame/GameScript/Loader/Event/EventManager.cs b/Assets/DemoGame/GameScript/Loader/Event/EventManager.cs index daf78da..6db4aae 100644 --- a/Assets/DemoGame/GameScript/Loader/Event/EventManager.cs +++ b/Assets/DemoGame/GameScript/Loader/Event/EventManager.cs @@ -2,7 +2,7 @@ using System; using System.Collections.Generic; using UnityEngine; -namespace ZGame +namespace ZC { public class EventManager : IEventManager { diff --git a/Assets/DemoGame/GameScript/Loader/Event/IEventManager.cs b/Assets/DemoGame/GameScript/Loader/Event/IEventManager.cs index 9fcc5e8..3a00585 100644 --- a/Assets/DemoGame/GameScript/Loader/Event/IEventManager.cs +++ b/Assets/DemoGame/GameScript/Loader/Event/IEventManager.cs @@ -1,6 +1,6 @@ using System; -namespace ZGame +namespace ZC { /// /// 事件管理器接口。 diff --git a/Assets/DemoGame/GameScript/Loader/Global.cs b/Assets/DemoGame/GameScript/Loader/Global.cs index f86098e..beeaf23 100644 --- a/Assets/DemoGame/GameScript/Loader/Global.cs +++ b/Assets/DemoGame/GameScript/Loader/Global.cs @@ -13,9 +13,6 @@ namespace Unity.Loader [SerializeField] EPlayMode playMode; [SerializeField] private string packageName = "DefaultPackage"; - ZCGame zcGame; - - private float time; private GlobalData _globalData; public GlobalData Data => _globalData; @@ -24,28 +21,29 @@ namespace Unity.Loader public static Action updateTime; public static Action updateScore; public static Action updateProgress; - - + + private Transform _objectPool; private bool isDisposed; private bool isPause; private float gameTime; public static Global _global; - private ObjectManager _objectManager; + private UIManager _uiManager; private ProcedureManager _procedureManager; private ResourcesLocalComponent _resourcesLocalComponent; + public static Transform Self => _global.transform; public static Transform ObjectPool => _global._objectPool; public static float GameTime => _global.gameTime; - - public static IObjectManager ObjectManager => _global._objectManager; public static IUIManager UIManager => _global._uiManager; public static IProcedureManager ProcedureManager => _global._procedureManager; public static IResourcesLocalComponent ResourcesLocalComponent => _global._resourcesLocalComponent; + #region mono + private void Awake() { _global = this; @@ -55,32 +53,50 @@ namespace Unity.Loader private void Start() { this._initializePackage = new InitializePackage(playMode, this.packageName, FinishCallback); - - _globalData = new GlobalData(); } private void Update() { - time += Time.fixedTime; + if (this.isPause) return; + + this.gameTime += Time.fixedTime; updateTime?.Invoke(_globalData.runTimeStr); // Debug.Log($"{_globalData.runTimeStr}"); } private void OnDestroy() { + isDisposed = true; _globalData.Dispose(); + _procedureManager.OnDispose(); + _uiManager.OnDispose(); + + _resourcesLocalComponent.Dispose(); + Debug.Log("关闭应用了"); } + #endregion + private void FinishCallback() { // yoo init finish Debug.Log($"yoo init finish {DateTime.Now}"); - + this._objectPool = transform.Find("ObjectPool"); this.isDisposed = false; this.isPause = false; + _globalData = new GlobalData(); AssemblyManager.Initialize(); + + this._uiManager = new UIManager(); + this._procedureManager = new ProcedureManager(); + this._resourcesLocalComponent = new ResourcesLocalComponent(); + + _uiManager.OnInit(); + _procedureManager.OnInit(); + + this._procedureManager.ChangeProcedure(ProcedureType.LoadingGameSceneProcedure); } } } \ No newline at end of file diff --git a/Assets/DemoGame/GameScript/Loader/Res/InitializePackage.cs b/Assets/DemoGame/GameScript/Loader/Res/InitializePackage.cs index 3d94b43..78d8d04 100644 --- a/Assets/DemoGame/GameScript/Loader/Res/InitializePackage.cs +++ b/Assets/DemoGame/GameScript/Loader/Res/InitializePackage.cs @@ -4,7 +4,7 @@ using System.IO; using Cysharp.Threading.Tasks; using UnityEngine; using YooAsset; -using ZGame; +using ZC; namespace Unity.Loader { diff --git a/Assets/DemoGame/GameScript/Loader/UI/UILoading.cs b/Assets/DemoGame/GameScript/Loader/UI/UILoading.cs index 2e56b86..a24d944 100644 --- a/Assets/DemoGame/GameScript/Loader/UI/UILoading.cs +++ b/Assets/DemoGame/GameScript/Loader/UI/UILoading.cs @@ -5,7 +5,7 @@ using UnityEngine; using UnityEngine.Serialization; using UnityEngine.UI; -namespace ZGame +namespace ZC { public class UILoading : MonoBehaviour { -- 2.25.1 From 31e77ef272edbaf5f5471aa0d304ad5c24c4fbaa Mon Sep 17 00:00:00 2001 From: zxl Date: Fri, 8 Nov 2024 17:25:44 +0800 Subject: [PATCH 3/3] =?UTF-8?q?mod=EF=BC=9A=E4=BC=98=E5=8C=96=E5=A4=84?= =?UTF-8?q?=E7=90=86=E6=96=B9=E5=BC=8F=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 目前逻辑为: UI在面板上跟物体进行深度绑定,但是UI通过工厂进行创建; 场景物体在面板上跟物体进行深度绑定,但是场景物体通过工厂进行创建; --- .../DemoGame/GameRes/Config/TaskListData.json | 2 +- .../Hotfix/FloorBase/GameObjectBase.cs | 21 ++++----- .../Hotfix/FloorBase/GameObjectFactory.cs | 43 +++++++++++++++---- .../Hotfix/FloorBase/IDGenerator.cs | 31 +++++++------ .../GameScript/Hotfix/FloorBase/Interfaces.cs | 1 + .../Hotfix/FloorBase/ManagerBase.cs | 35 ++++++++++++++- .../Hotfix/Other/TaskListManager.cs | 11 +++-- .../Logic/LoadingGameSceneProcedure.cs | 26 +++++++++-- .../Hotfix/Procedure/ProcedureManager.cs | 4 +- .../Hotfix/Res/ResourcesLocalComponent.cs | 11 +++-- .../DemoGame/GameScript/Hotfix/TestZhongLi.cs | 27 ++++++------ .../GameScript/Hotfix/UI/IUIManager.cs | 3 +- .../DemoGame/GameScript/Hotfix/UI/UIBase.cs | 9 ++-- .../GameScript/Hotfix/UI/UIManager.cs | 32 ++++++-------- Assets/DemoGame/GameScript/Loader/Global.cs | 25 ++++++++--- Assets/Scenes/Init.unity | 17 ++++++++ 16 files changed, 206 insertions(+), 92 deletions(-) diff --git a/Assets/DemoGame/GameRes/Config/TaskListData.json b/Assets/DemoGame/GameRes/Config/TaskListData.json index 16aa426..bba1914 100644 --- a/Assets/DemoGame/GameRes/Config/TaskListData.json +++ b/Assets/DemoGame/GameRes/Config/TaskListData.json @@ -1 +1 @@ -{"ChildData":[{"Title":"大众","Type":0,"parent":null,"ChildData":[{"Title":"宝来","Type":0,"parent":null,"ChildData":[]},{"Title":"帕沙特","Type":0,"parent":null,"ChildData":[]}]},{"Title":"长安","Type":0,"parent":null,"ChildData":[{"Title":"cs35","Type":0,"parent":null,"ChildData":[]},{"Title":"cs55","Type":0,"parent":null,"ChildData":[]},{"Title":"cs75","Type":0,"parent":null,"ChildData":[]}]},{"Title":"吉利","Type":0,"parent":null,"ChildData":[{"Title":"星瑞","Type":0,"parent":null,"ChildData":[]},{"Title":"几何","Type":0,"parent":null,"ChildData":[]}]}],"name":"","hideFlags":0} \ No newline at end of file +{"ChildData":[{"Title":"1.精神的撒打发打发","Type":0,"parent":null,"ChildData":[{"Title":"1.1.阿飞的方式方法","Type":0,"parent":null,"ChildData":[{"Title":"1.2.发的是凤飞飞","Type":0,"parent":null,"ChildData":[]}]}]},{"Title":"2.非官方的个人各方","Type":0,"parent":null,"ChildData":[{"Title":"2.1.丰富和提高提高电网","Type":0,"parent":null,"ChildData":[]},{"Title":"2.2.供热公司v的方法去外地","Type":0,"parent":null,"ChildData":[]},{"Title":"2.3.稳定个人观点v分","Type":0,"parent":null,"ChildData":[]},{"Title":"2.4.如果人工投入股市大幅","Type":0,"parent":null,"ChildData":[]}]},{"Title":"3.Greg突然感到十分发","Type":0,"parent":null,"ChildData":[{"Title":"3.1.而该人士对此娃娃","Type":0,"parent":null,"ChildData":[]},{"Title":"3.2.更高尚的人格力量地方","Type":0,"parent":null,"ChildData":[]},{"Title":"3.3.供电公司对方的身份","Type":0,"parent":null,"ChildData":[]},{"Title":"3.4.官方山豆根士大夫","Type":0,"parent":null,"ChildData":[]}]}]} \ No newline at end of file diff --git a/Assets/DemoGame/GameScript/Hotfix/FloorBase/GameObjectBase.cs b/Assets/DemoGame/GameScript/Hotfix/FloorBase/GameObjectBase.cs index 3ed89bc..843d23d 100644 --- a/Assets/DemoGame/GameScript/Hotfix/FloorBase/GameObjectBase.cs +++ b/Assets/DemoGame/GameScript/Hotfix/FloorBase/GameObjectBase.cs @@ -3,13 +3,14 @@ using UnityEngine; namespace ZC { - public class GameObjectBase : MonoBehaviour, IBehaviour //, ICreateBindingGo + public class GameObjectBase : MonoBehaviour, IBehaviour { - private GameObject _go; - private long _id; + private long _id = 0; private bool _isDisposed; private bool _isPause; - public GameObject go => this._go; + GameObjectBinding _binding; + + public GameObjectBinding binding => _binding; public long Id => this._id; @@ -17,20 +18,19 @@ namespace ZC public bool isPause => this._isPause; - #region mono - private void Awake() { + _binding = gameObject.GetComponent(); OnInit(); } - private void OnDestroy() + public void SetID(long id) { - OnDispose(); + if (_id != 0) + throw new ArgumentException("id 不允许二次修改,一次固定的!"); + _id = id; } - #endregion - public virtual void OnInit() { this._isDisposed = false; @@ -54,6 +54,7 @@ namespace ZC public virtual void OnDispose() { this._isDisposed = true; + DestroyImmediate(this.gameObject); } } } \ No newline at end of file diff --git a/Assets/DemoGame/GameScript/Hotfix/FloorBase/GameObjectFactory.cs b/Assets/DemoGame/GameScript/Hotfix/FloorBase/GameObjectFactory.cs index 2b07643..4684792 100644 --- a/Assets/DemoGame/GameScript/Hotfix/FloorBase/GameObjectFactory.cs +++ b/Assets/DemoGame/GameScript/Hotfix/FloorBase/GameObjectFactory.cs @@ -1,18 +1,43 @@ using System.Collections.Generic; +using Unity.Loader; using UnityEngine; namespace ZC { public static class GameObjectFactory { -// public static T Create(GameObject go = null) where T : GameObjectBase -// { -// var t = new T(); -// var id = t.GetHashCode(); -// -// t.OnInit(); -// ZCGame.ObjectManager.Add(t); -// return t; -// } + private static Transform parent; + + public static T CreateGameObject(string path) where T : GameObjectBase + { + var go = ResourcesLocalComponent.Instance.LoadGameObjectSync(path); + if (parent == null) + parent = Global.ObjectPool; + go.transform.SetParent(parent); + var objectBase = go.AddComponent(); + objectBase.SetID(IDGenerator.Generate()); + Global.ObjectManager.Add(objectBase); + return objectBase; + } + + public static void DeleteGameObject(long id) + { + Global.ObjectManager.Remove(id); + } + } + + public static class UIGameObjectFactory + { + private static Transform parent; + + public static T CreateUI(UIType uiType, string path, UILayer uiLayer) where T : UIBase + { + return Global.UIManager.CreateUI(uiType, path, uiLayer); + } + + public static void DeleteUI(UIType uiType) + { + Global.UIManager.DeleteUI(uiType); + } } } \ No newline at end of file diff --git a/Assets/DemoGame/GameScript/Hotfix/FloorBase/IDGenerator.cs b/Assets/DemoGame/GameScript/Hotfix/FloorBase/IDGenerator.cs index ce7e130..840646a 100644 --- a/Assets/DemoGame/GameScript/Hotfix/FloorBase/IDGenerator.cs +++ b/Assets/DemoGame/GameScript/Hotfix/FloorBase/IDGenerator.cs @@ -13,26 +13,31 @@ namespace ZC private static readonly long twepoch = 1288834974657L; // Twitter Snowflake算法中的自定义起始时间 private static readonly long machineId = 1L; // 机器码,可以自定义 + static object o = new object(); + public static long Generate() { - long timestamp = TimeGen(); - - if (lastTimestamp == timestamp) + lock (o) { - sequence = (sequence + 1) & 4095L; - if (sequence == 0) + long timestamp = TimeGen(); + + if (lastTimestamp == timestamp) { - timestamp = TilNextMillis(lastTimestamp); + sequence = (sequence + 1) & 4095L; + if (sequence == 0) + { + timestamp = TilNextMillis(lastTimestamp); + } + } + else + { + sequence = 0L; } - } - else - { - sequence = 0L; - } - lastTimestamp = timestamp; + lastTimestamp = timestamp; - return (timestamp - twepoch) << 22 | machineId << 12 | sequence; + return (timestamp - twepoch) << 22 | machineId << 12 | sequence; + } } private static long TilNextMillis(long lastTimestamp) diff --git a/Assets/DemoGame/GameScript/Hotfix/FloorBase/Interfaces.cs b/Assets/DemoGame/GameScript/Hotfix/FloorBase/Interfaces.cs index 732f429..ead6c44 100644 --- a/Assets/DemoGame/GameScript/Hotfix/FloorBase/Interfaces.cs +++ b/Assets/DemoGame/GameScript/Hotfix/FloorBase/Interfaces.cs @@ -5,6 +5,7 @@ namespace ZC public interface ICreateBindingGo { GameObject go { get; } + GameObjectBinding binding { get; } void SetGo(GameObject go); } diff --git a/Assets/DemoGame/GameScript/Hotfix/FloorBase/ManagerBase.cs b/Assets/DemoGame/GameScript/Hotfix/FloorBase/ManagerBase.cs index 35a040a..36fcf34 100644 --- a/Assets/DemoGame/GameScript/Hotfix/FloorBase/ManagerBase.cs +++ b/Assets/DemoGame/GameScript/Hotfix/FloorBase/ManagerBase.cs @@ -6,8 +6,39 @@ namespace ZC { } - internal abstract class ManagerBase : GameObjectBase, IManager + internal abstract class ManagerBase : IBehaviour, IManager { - + private long _id = IDGenerator.Generate(); + private bool _isDisposed = false; + private bool _isPause = false; + + public long Id => this._id; + + public bool isDisposed => this._isDisposed; + + public bool isPause => this._isPause; + + public virtual void OnInit() + { + } + + public virtual void OnUpdate(float dateTime) + { + } + + public virtual void OnPause() + { + this._isPause = true; + } + + public virtual void OnResume() + { + this._isPause = false; + } + + public virtual void OnDispose() + { + this._isDisposed = true; + } } } \ No newline at end of file diff --git a/Assets/DemoGame/GameScript/Hotfix/Other/TaskListManager.cs b/Assets/DemoGame/GameScript/Hotfix/Other/TaskListManager.cs index 35f5ca4..5fcbee3 100644 --- a/Assets/DemoGame/GameScript/Hotfix/Other/TaskListManager.cs +++ b/Assets/DemoGame/GameScript/Hotfix/Other/TaskListManager.cs @@ -13,12 +13,11 @@ namespace ZC { base.OnInit(); - // string filePath = $"{Application.dataPath}/DemoGame/GameRes/Config/TaskListData.json"; - // var textAsset = ResourcesLocalComponent.Instance.LoadAssetSync(AssetConst.Assets_DemoGame_GameRes_UIPanel_UIBattle_prefab); - // // var json = File.ReadAllText(textAsset.text); - // var datas = JsonConvert.DeserializeObject(textAsset.text); - // _datas = datas; - // _datas.Init(); + string filePath = $"{Application.dataPath}/DemoGame/GameRes/Config/TaskListData.json"; + var textAsset = ResourcesLocalComponent.Instance.LoadAssetSync(filePath); + var datas = JsonConvert.DeserializeObject(textAsset.text); + _datas = datas; + _datas.Init(); } public void SetState(string title, TaskListType type) diff --git a/Assets/DemoGame/GameScript/Hotfix/Procedure/Logic/LoadingGameSceneProcedure.cs b/Assets/DemoGame/GameScript/Hotfix/Procedure/Logic/LoadingGameSceneProcedure.cs index 09bf5b2..c08d6dc 100644 --- a/Assets/DemoGame/GameScript/Hotfix/Procedure/Logic/LoadingGameSceneProcedure.cs +++ b/Assets/DemoGame/GameScript/Hotfix/Procedure/Logic/LoadingGameSceneProcedure.cs @@ -7,6 +7,8 @@ namespace ZC [Procedure(ProcedureType.LoadingGameSceneProcedure)] class LoadingGameSceneProcedure : ProcedureBase { + private TestZhongLi _testZhongLi; + public override void OnEnter() { base.OnEnter(); @@ -14,14 +16,32 @@ namespace ZC UniTask.Create(async () => { // await ResourcesLocalComponent.Instance.LoadSceneAsync(AssetConst.Assets_DemoGame_GameRes_Scene_Game_unity); - var loadAssetAsync = await ResourcesLocalComponent.Instance.LoadAssetAndInsAsync(AssetConst.Assets_DemoGame_GameRes_Entity_Cube_prefab); - Debug.Log("加载的是:" + loadAssetAsync); + // var loadAssetAsync = await ResourcesLocalComponent.Instance.LoadAssetAndInsAsync(AssetConst.Assets_DemoGame_GameRes_Entity_Cube_prefab); + // Debug.Log("加载的是:" + loadAssetAsync); + _testZhongLi = GameObjectFactory.CreateGameObject(AssetConst + .Assets_DemoGame_GameRes_Entity_Cube_prefab); // ZCGame.ProcedureManager.ChangeProcedure(ProcedureType.GameSceneLogicProcedure); - Global.UIManager.CreateUI(UIType.MainUI, AssetConst.Assets_DemoGame_GameRes_UIPanel_UIMain_prefab, UILayer.High); + UIGameObjectFactory.CreateUI(UIType.MainUI, + AssetConst.Assets_DemoGame_GameRes_UIPanel_UIMain_prefab, UILayer.High); }).Forget(); } + public override void OnUpdate(float dateTime) + { + base.OnUpdate(dateTime); + if (Input.GetKeyDown(KeyCode.A)) + { + GameObjectFactory.DeleteGameObject(_testZhongLi.Id); + } + + if (Input.GetKeyDown(KeyCode.W)) + { + _testZhongLi = GameObjectFactory.CreateGameObject(AssetConst + .Assets_DemoGame_GameRes_Entity_Cube_prefab); + } + } + public override void OnLeave() { base.OnLeave(); diff --git a/Assets/DemoGame/GameScript/Hotfix/Procedure/ProcedureManager.cs b/Assets/DemoGame/GameScript/Hotfix/Procedure/ProcedureManager.cs index a4a7372..f3d4e10 100644 --- a/Assets/DemoGame/GameScript/Hotfix/Procedure/ProcedureManager.cs +++ b/Assets/DemoGame/GameScript/Hotfix/Procedure/ProcedureManager.cs @@ -19,6 +19,7 @@ namespace ZC { private Dictionary _procedures = new Dictionary(); private IProcedure currentProcedure; + public ProcedureType CurrentProcedureType => currentProcedure.procedureType; public override void OnInit() { @@ -31,7 +32,7 @@ namespace ZC var procedureType = procedureAttribute.ProcedureType; _procedures.Add(procedureType, (IProcedure)Activator.CreateInstance(type, false)); } - + foreach (var procedureBase in _procedures.Values) { procedureBase.Init(); @@ -94,6 +95,5 @@ namespace ZC return null; } - } } \ No newline at end of file diff --git a/Assets/DemoGame/GameScript/Hotfix/Res/ResourcesLocalComponent.cs b/Assets/DemoGame/GameScript/Hotfix/Res/ResourcesLocalComponent.cs index 25015c0..c511908 100644 --- a/Assets/DemoGame/GameScript/Hotfix/Res/ResourcesLocalComponent.cs +++ b/Assets/DemoGame/GameScript/Hotfix/Res/ResourcesLocalComponent.cs @@ -29,7 +29,8 @@ namespace ZC { if (instance == null) { - instance = new ResourcesLocalComponent(); + throw new NullReferenceException(); + // instance = new ResourcesLocalComponent(); } return instance; @@ -45,6 +46,8 @@ namespace ZC public ResourcesLocalComponent() { + instance = this; + resourcePackage = YooAssets.GetPackage("DefaultPackage"); var transform = Global.Self.transform; @@ -132,7 +135,8 @@ namespace ZC return loadAssetAsync.AssetObject; } - public async UniTask LoadAssetAndInsAsync(string location, Transform parent = null, uint priority = 0) + public async UniTask LoadAssetAndInsAsync(string location, Transform parent = null, + uint priority = 0) { var loadAssetAsync = YooAssets.LoadAssetAsync(location, priority); while (!loadAssetAsync.IsDone) @@ -146,7 +150,8 @@ namespace ZC return instantiateOperation.Result; } - public async UniTask LoadSceneAsync(string location, LoadSceneMode sceneMode = LoadSceneMode.Single, bool suspendLoad = false, uint priority = 100U, Action callback = null) + public async UniTask LoadSceneAsync(string location, LoadSceneMode sceneMode = LoadSceneMode.Single, + bool suspendLoad = false, uint priority = 100U, Action callback = null) { var loadAssetAsync = YooAssets.LoadSceneAsync(location, sceneMode, suspendLoad, priority); while (!loadAssetAsync.IsDone) diff --git a/Assets/DemoGame/GameScript/Hotfix/TestZhongLi.cs b/Assets/DemoGame/GameScript/Hotfix/TestZhongLi.cs index 76d4730..fb3aa5d 100644 --- a/Assets/DemoGame/GameScript/Hotfix/TestZhongLi.cs +++ b/Assets/DemoGame/GameScript/Hotfix/TestZhongLi.cs @@ -12,19 +12,20 @@ namespace ZC public void Update() { - if (SystemInfo.supportsGyroscope) - { - var gyro = Input.gyro; - gyro.enabled = true; - Debug.Log($"{gyro.rotationRate} , {gyro.attitude}"); -// Camera.main.transform.Rotate(gyro.rotationRate); - Camera.main.transform.rotation = gyro.attitude; - Debug.Log($"raw: {Input.compass.rawVector}"); - } - else - { -// Debug.Log("没找到?"); - } + transform.Rotate(Vector3.up); +// if (SystemInfo.supportsGyroscope) +// { +// var gyro = Input.gyro; +// gyro.enabled = true; +// Debug.Log($"{gyro.rotationRate} , {gyro.attitude}"); +// // Camera.main.transform.Rotate(gyro.rotationRate); +// Camera.main.transform.rotation = gyro.attitude; +// Debug.Log($"raw: {Input.compass.rawVector}"); +// } +// else +// { +// // Debug.Log("没找到?"); +// } } } } \ No newline at end of file diff --git a/Assets/DemoGame/GameScript/Hotfix/UI/IUIManager.cs b/Assets/DemoGame/GameScript/Hotfix/UI/IUIManager.cs index 069ae25..86f4ff4 100644 --- a/Assets/DemoGame/GameScript/Hotfix/UI/IUIManager.cs +++ b/Assets/DemoGame/GameScript/Hotfix/UI/IUIManager.cs @@ -7,7 +7,8 @@ namespace ZC public interface IUIManager { TMP_FontAsset font { get; set; } - IUI CreateUI(UIType uiType, string path, UILayer uiLayer); + T CreateUI(UIType uiType, string path, UILayer uiLayer) where T : UIBase; + void DeleteUI(UIType uiType); IUI ShowUI(UIType uiType); diff --git a/Assets/DemoGame/GameScript/Hotfix/UI/UIBase.cs b/Assets/DemoGame/GameScript/Hotfix/UI/UIBase.cs index ca4aa2d..62e539e 100644 --- a/Assets/DemoGame/GameScript/Hotfix/UI/UIBase.cs +++ b/Assets/DemoGame/GameScript/Hotfix/UI/UIBase.cs @@ -16,8 +16,8 @@ namespace ZC public abstract class UIBase : MonoBehaviour, IUI { - private bool _isPause; - private bool _isActive; + private bool _isPause = true; + private bool _isActive = false; private CanvasGroup _group; public bool isPause => _isPause; @@ -31,15 +31,11 @@ namespace ZC private void Awake() { - _isPause = true; - _isActive = false; _uiGameObjectBinding = GetComponent(); - Init(); } private void OnDestroy() { - Dispose(); } #endregion @@ -86,6 +82,7 @@ namespace ZC { _isActive = false; _isPause = true; + DestroyImmediate(this.gameObject); } } } \ No newline at end of file diff --git a/Assets/DemoGame/GameScript/Hotfix/UI/UIManager.cs b/Assets/DemoGame/GameScript/Hotfix/UI/UIManager.cs index 82e54d8..91927b2 100644 --- a/Assets/DemoGame/GameScript/Hotfix/UI/UIManager.cs +++ b/Assets/DemoGame/GameScript/Hotfix/UI/UIManager.cs @@ -52,32 +52,28 @@ namespace ZC } - public IUI CreateUI(UIType uiType, string path, UILayer uiLayer) + public T CreateUI(UIType uiType, string path, UILayer uiLayer) where T : UIBase { var gameObject = ResourcesLocalComponent.Instance.LoadUIGameObjectSync(path, uiLayer); - - // if (!this._types.TryGetValue(uiType, out var type)) - // { - // throw new InvalidOperationException(); - // } - // - // if (Activator.CreateInstance(type, false) is not UIBase ui) - // throw new NullReferenceException(); - // ui.SetGameObject(gameObject); - var uiBase = gameObject.GetComponent(); + var uiBase = gameObject.AddComponent(); uiBase.Init(); uiBase.Close(); _uiDic.Add(uiType, uiBase); - -//#if UNITY_EDITOR - // view -// var addComponent = gameObject.GetComponent(); -// addComponent.SetStart(ui, this.font); -//#endif - return uiBase; } + public void DeleteUI(UIType uiType) + { + if (_uiDic.TryGetValue(uiType, out var ui)) + { + ui.Dispose(); + } + else + { + throw new NullReferenceException(); + } + } + public IUI ShowUI(UIType uiType) { if (_uiDic.TryGetValue(uiType, out var ui)) diff --git a/Assets/DemoGame/GameScript/Loader/Global.cs b/Assets/DemoGame/GameScript/Loader/Global.cs index beeaf23..5d69572 100644 --- a/Assets/DemoGame/GameScript/Loader/Global.cs +++ b/Assets/DemoGame/GameScript/Loader/Global.cs @@ -8,6 +8,8 @@ namespace Unity.Loader { public class Global : MonoBehaviour { + private static Global _global; + private InitializePackage _initializePackage; [SerializeField] EPlayMode playMode; @@ -26,12 +28,13 @@ namespace Unity.Loader private Transform _objectPool; private bool isDisposed; private bool isPause; + private bool _isInitFinish; private float gameTime; - public static Global _global; private UIManager _uiManager; private ProcedureManager _procedureManager; + private ObjectManager _objectManager; private ResourcesLocalComponent _resourcesLocalComponent; public static Transform Self => _global.transform; @@ -39,8 +42,13 @@ namespace Unity.Loader public static float GameTime => _global.gameTime; public static IUIManager UIManager => _global._uiManager; public static IProcedureManager ProcedureManager => _global._procedureManager; + public static IObjectManager ObjectManager => _global._objectManager; public static IResourcesLocalComponent ResourcesLocalComponent => _global._resourcesLocalComponent; + #region 可视化 + + #endregion + #region mono @@ -57,11 +65,14 @@ namespace Unity.Loader private void Update() { - if (this.isPause) return; + if (!_isInitFinish || this.isPause) return; this.gameTime += Time.fixedTime; updateTime?.Invoke(_globalData.runTimeStr); - // Debug.Log($"{_globalData.runTimeStr}"); + + _procedureManager.OnUpdate(gameTime); + // _uiManager.OnUpdate(gameTime); + // _objectManager.OnUpdate(gameTime); } private void OnDestroy() @@ -70,6 +81,7 @@ namespace Unity.Loader _globalData.Dispose(); _procedureManager.OnDispose(); _uiManager.OnDispose(); + _objectManager.OnDispose(); _resourcesLocalComponent.Dispose(); Debug.Log("关闭应用了"); @@ -89,13 +101,16 @@ namespace Unity.Loader AssemblyManager.Initialize(); + this._resourcesLocalComponent = new ResourcesLocalComponent(); + this._objectManager = new ObjectManager(); this._uiManager = new UIManager(); this._procedureManager = new ProcedureManager(); - this._resourcesLocalComponent = new ResourcesLocalComponent(); - + + _objectManager.OnInit(); _uiManager.OnInit(); _procedureManager.OnInit(); + _isInitFinish = true; this._procedureManager.ChangeProcedure(ProcedureType.LoadingGameSceneProcedure); } } diff --git a/Assets/Scenes/Init.unity b/Assets/Scenes/Init.unity index 729d315..49d6edd 100644 --- a/Assets/Scenes/Init.unity +++ b/Assets/Scenes/Init.unity @@ -38,6 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -3264,10 +3265,22 @@ PrefabInstance: propertyPath: m_Name value: IngameDebugConsole objectReference: {fileID: 0} + - target: {fileID: 11414302, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3} + propertyPath: m_Value + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11452418, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3} + propertyPath: startMinimized + value: 1 + objectReference: {fileID: 0} - target: {fileID: 11490438, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3} propertyPath: m_BlockingMask.m_Bits value: 55 objectReference: {fileID: 0} + - target: {fileID: 22400762, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3} + propertyPath: m_AnchoredPosition.y + value: -0.000061035156 + objectReference: {fileID: 0} - target: {fileID: 22426080, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3} propertyPath: m_AnchorMax.x value: 0 @@ -3276,6 +3289,10 @@ PrefabInstance: propertyPath: m_AnchorMax.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 22426080, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 22428984, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3} propertyPath: m_AnchorMax.y value: 0 -- 2.25.1