private void Awake() { Framework.Debug.SetLogger(new Logger()); GameFramework.Register(new FsmManager()); mFsm = FsmManager.Instance.CreateFsm <FsmTest>("FsmTest", this, new NormalState(), new TiredState(), new DeadState()); mFsm.Start <NormalState>(); }
private void Awake() { Framework.Debug.SetLogger(new Logger()); GameFramework.Register(new NetworkManager()); channel = new TcpNetworkChannel("testTCP", this); }
private void Awake() { Framework.Debug.SetLogger(new Logger()); GameFramework.Register(new SettingManager(new SettingHelper(), true)); GameFramework.Register(new EventManager()); EventManager.Instance.AddListener <string>(TestEvent.left, OnEvent); EventManager.Instance.AddListener <string>(TestEvent.right, OnEvent2); EventManager.Instance.AddListener(TestEvent.other, OnEvent3); }
private void Awake() { if (!inited) { inited = true; Framework.Debug.SetLogger(new Logger()); GameFramework.Register(new ResourceManager()); GameFramework.Register(new UIManager()); GameFramework.Register(new SceneManager()); SetLoader(); GameObject prefab = ResourceManager.Instance.LoadAsset <GameObject>("Assets/Scripts/Test/Scene/Curtain/SceneCurtain.prefab"); GameObject obj = GameObject.Instantiate(prefab); DefaultSceneCurtain sceneCurtain = obj.GetComponent <DefaultSceneCurtain>(); DontDestroyOnLoad(obj); SceneManager.Instance.SetDefaultSceneCurtain(sceneCurtain); } }