Ejemplo n.º 1
0
    void IFsmNode.OnEnter()
    {
        AudioPlayerSetting.InitAudioSetting();

        // 使用协程初始化
        MotionEngine.StartCoroutine(Init());
    }
Ejemplo n.º 2
0
        public void Start()
        {
            HotfixNetManager.Instance.Create();
            FsmManager.Instance.Create();

            // 缓存所有的特性
            HotfixLog.Log("收集所有热更类的属性并缓存");
            {
                Attribute attribute1 = HotfixTypeHelper.GetAttribute <WindowAttribute>(typeof(UILogin));
                ILRManager.Instance.CacheHotfixAttribute(typeof(UILogin), attribute1);
                Attribute attribute2 = HotfixTypeHelper.GetAttribute <WindowAttribute>(typeof(UIMain));
                ILRManager.Instance.CacheHotfixAttribute(typeof(UIMain), attribute2);
                Attribute attribute3 = HotfixTypeHelper.GetAttribute <WindowAttribute>(typeof(UIMap));
                ILRManager.Instance.CacheHotfixAttribute(typeof(UIMap), attribute3);
            }

            // 开启协程加载资源
            MotionEngine.StartCoroutine(AsyncLoadAssets());

            // 测试热更事件
            HotfixEventManager.Instance.AddListener <HotfixEventDefine.ClickSkill1Event>(OnHandleEventMessage);
            HotfixEventManager.Instance.AddListener <HotfixEventDefine.ClickSkill2Event>(OnHandleEventMessage);
            HotfixEventManager.Instance.AddListener <HotfixEventDefine.ClickSkill3Event>(OnHandleEventMessage);
            HotfixEventManager.Instance.AddListener <HotfixEventDefine.ClickSkill4Event>(OnHandleEventMessage);
            HotfixEventManager.Instance.AddListener <HotfixEventDefine.ClickSkill5Event>(OnHandleEventMessage);
        }
Ejemplo n.º 3
0
        public void Start()
        {
            HotfixNetManager.Instance.Create();
            FsmManager.Instance.Create();

            // 缓存所有的特性
            HotfixLog.Log("收集所有热更类的属性并缓存");
            {
                Attribute attribute1 = HotfixTypeHelper.GetAttribute <WindowAttribute>(typeof(UILogin));
                ILRManager.Instance.CacheHotfixAttribute(typeof(UILogin), attribute1);
                Attribute attribute2 = HotfixTypeHelper.GetAttribute <WindowAttribute>(typeof(UIMain));
                ILRManager.Instance.CacheHotfixAttribute(typeof(UIMain), attribute2);
                Attribute attribute3 = HotfixTypeHelper.GetAttribute <WindowAttribute>(typeof(UIMap));
                ILRManager.Instance.CacheHotfixAttribute(typeof(UIMap), attribute3);
            }

            // 开启协程加载资源
            MotionEngine.StartCoroutine(AsyncLoadAssets());
        }
Ejemplo n.º 4
0
 void IFsmNode.OnEnter()
 {
     PatchEventDispatcher.SendPatchStatesChangeMsg(EPatchStates.DownloadWebFiles);
     MotionEngine.StartCoroutine(Download());
 }
 void IFsmNode.OnEnter()
 {
     PatchEventDispatcher.SendPatchStepsChangeMsg(EPatchStates.RequestGameVersion);
     MotionEngine.StartCoroutine(Download());
 }
Ejemplo n.º 6
0
 public void StartGame()
 {
     GameLog.Log("Hello game world.");
     MotionEngine.StartCoroutine(LoadAssets());
 }
Ejemplo n.º 7
0
 void IFsmNode.OnEnter()
 {
     PatchEventDispatcher.SendPatchStepsChangeMsg(EPatchStates.GetWebPatchManifest);
     MotionEngine.StartCoroutine(Download());
 }
 void IFsmNode.OnEnter()
 {
     PatchEventDispatcher.SendPatchStatesChangeMsg(EPatchStates.ParseAppPatchManifest);
     MotionEngine.StartCoroutine(DownLoad());
 }