Skip to content

Commit

Permalink
ConfigLoader放到Entry中
Browse files Browse the repository at this point in the history
  • Loading branch information
egametang committed Nov 11, 2023
1 parent 1a23b5c commit 4b2a86b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ public class EntryEvent1_InitShare: AEvent<Scene, EntryEvent1>
{
protected override async ETTask Run(Scene root, EntryEvent1 args)
{
await World.Instance.AddSingleton<ConfigLoader>().LoadAsync();
root.AddComponent<TimerComponent>();
root.AddComponent<CoroutineLockComponent>();
root.AddComponent<ObjectWait>();
Expand Down
6 changes: 3 additions & 3 deletions Unity/Assets/Scripts/Model/Share/Entry.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Collections.Generic;

namespace ET
namespace ET
{
public struct EntryEvent1
{
Expand Down Expand Up @@ -43,6 +41,8 @@ private static async ETTask StartAsync()

// 创建需要reload的code singleton
CodeTypes.Instance.CreateCode();

await World.Instance.AddSingleton<ConfigLoader>().LoadAsync();

await FiberManager.Instance.Create(SchedulerType.Main, ConstFiberId.Main, 0, SceneType.Main, "");
}
Expand Down

0 comments on commit 4b2a86b

Please sign in to comment.