24 lines
641 B
C#
24 lines
641 B
C#
using Fantasy.Async;
|
|
using Fantasy.Event;
|
|
|
|
namespace Fantasy;
|
|
|
|
public sealed class OnCreateScene_Init : AsyncEventSystem<OnCreateScene>
|
|
{
|
|
protected override async FTask Handler(OnCreateScene self)
|
|
{
|
|
var scene = self.Scene;
|
|
|
|
switch (scene.SceneType)
|
|
{
|
|
case SceneType.Mail:
|
|
{
|
|
// 离线邮件箱管理组件。
|
|
await scene.AddComponent<MailBoxManageComponent>().Init();
|
|
// 邮件的用户信息管理组件。
|
|
await scene.AddComponent<MailUnitManageComponent>().Init();
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
} |