You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.6 KiB

using UnityEngine;
namespace ET
{
public class GameSceneManagerComponentAwakeSystem : AwakeSystem<GameSceneManagerComponent>
{
public override void Awake(GameSceneManagerComponent self)
{
self.Awake();
}
}
public class GameSceneManagerComponentDestroySystem : DestroySystem<GameSceneManagerComponent>
{
public override void Destroy(GameSceneManagerComponent self)
{
self.Destroy();
}
}
[FriendClass(typeof(GameSceneManagerComponent))]
public static class GameSceneManagerComponentSystem
{
public static void Awake(this GameSceneManagerComponent self)
{
var sceneRoot = GameObject.Find("SceneRoot");
ReferenceCollector rc = sceneRoot.GetComponent<ReferenceCollector>();
self.SceneRoots.Add(rc.Get<GameObject>("MainSceneRoot"));
self.SceneRoots.Add(rc.Get<GameObject>("BattleSceneRoot"));
self.Hide(GameSceneType.Battle);
}
public static void Show(this GameSceneManagerComponent self, GameSceneType type)
{
self.SceneRoots[(int)type].SetActive(true);
}
public static void Hide(this GameSceneManagerComponent self, GameSceneType type)
{
self.SceneRoots[(int)type].SetActive(false);
}
public static GameObject GetRoot(this GameSceneManagerComponent self, GameSceneType type)
{
return self.SceneRoots[(int)type];
}
public static void Destroy(this GameSceneManagerComponent self)
{
}
}
}