提交示例代码

This commit is contained in:
Bob.Song
2026-03-05 11:39:06 +08:00
commit 25958f58c3
2534 changed files with 209593 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
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.Gate:
{
// 添加物品使用分发的组件
await scene.AddComponent<ItemUseComponent>().Initialize();
break;
}
case SceneType.Chat:
{
break;
}
}
}
}