update space shooter
This commit is contained in:
+2
-2
@@ -2,7 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UniFramework.Machine;
|
||||
using UniFramework.Module;
|
||||
using UniFramework.Singleton;
|
||||
using YooAsset;
|
||||
|
||||
/// <summary>
|
||||
@@ -19,7 +19,7 @@ public class FsmCreateDownloader : IStateNode
|
||||
void IStateNode.OnEnter()
|
||||
{
|
||||
PatchEventDefine.PatchStatesChange.SendEventMessage("创建补丁下载器!");
|
||||
UniModule.StartCoroutine(CreateDownloader());
|
||||
UniSingleton.StartCoroutine(CreateDownloader());
|
||||
}
|
||||
void IStateNode.OnUpdate()
|
||||
{
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UniFramework.Machine;
|
||||
using UniFramework.Module;
|
||||
using UniFramework.Singleton;
|
||||
using YooAsset;
|
||||
|
||||
/// <summary>
|
||||
@@ -18,7 +18,7 @@ public class FsmDownloadFiles : IStateNode
|
||||
void IStateNode.OnEnter()
|
||||
{
|
||||
PatchEventDefine.PatchStatesChange.SendEventMessage("开始下载补丁文件!");
|
||||
UniModule.StartCoroutine(BeginDownload());
|
||||
UniSingleton.StartCoroutine(BeginDownload());
|
||||
}
|
||||
void IStateNode.OnUpdate()
|
||||
{
|
||||
|
||||
+2
-2
@@ -4,7 +4,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UniFramework.Machine;
|
||||
using UniFramework.Module;
|
||||
using UniFramework.Singleton;
|
||||
using YooAsset;
|
||||
|
||||
/// <summary>
|
||||
@@ -21,7 +21,7 @@ internal class FsmInitialize : IStateNode
|
||||
void IStateNode.OnEnter()
|
||||
{
|
||||
PatchEventDefine.PatchStatesChange.SendEventMessage("初始化资源包!");
|
||||
UniModule.StartCoroutine(InitPackage());
|
||||
UniSingleton.StartCoroutine(InitPackage());
|
||||
}
|
||||
void IStateNode.OnUpdate()
|
||||
{
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UniFramework.Machine;
|
||||
using UniFramework.Module;
|
||||
using UniFramework.Singleton;
|
||||
|
||||
/// <summary>
|
||||
/// 流程更新完毕
|
||||
@@ -17,7 +17,7 @@ internal class FsmPatchDone : IStateNode
|
||||
PatchEventDefine.PatchStatesChange.SendEventMessage("开始游戏!");
|
||||
|
||||
// 创建游戏管理器
|
||||
UniModule.CreateModule<GameManager>();
|
||||
UniSingleton.CreateSingleton<GameManager>();
|
||||
|
||||
// 开启游戏流程
|
||||
GameManager.Instance.Run();
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UniFramework.Machine;
|
||||
using UniFramework.Module;
|
||||
using UniFramework.Singleton;
|
||||
|
||||
/// <summary>
|
||||
/// 流程准备工作
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UniFramework.Machine;
|
||||
using UniFramework.Module;
|
||||
using UniFramework.Singleton;
|
||||
using YooAsset;
|
||||
|
||||
/// <summary>
|
||||
@@ -19,7 +19,7 @@ public class FsmUpdateManifest : IStateNode
|
||||
void IStateNode.OnEnter()
|
||||
{
|
||||
PatchEventDefine.PatchStatesChange.SendEventMessage("更新资源清单!");
|
||||
UniModule.StartCoroutine(UpdateManifest());
|
||||
UniSingleton.StartCoroutine(UpdateManifest());
|
||||
}
|
||||
void IStateNode.OnUpdate()
|
||||
{
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UniFramework.Machine;
|
||||
using UniFramework.Module;
|
||||
using UniFramework.Singleton;
|
||||
using YooAsset;
|
||||
|
||||
/// <summary>
|
||||
@@ -19,7 +19,7 @@ internal class FsmUpdateVersion : IStateNode
|
||||
void IStateNode.OnEnter()
|
||||
{
|
||||
PatchEventDefine.PatchStatesChange.SendEventMessage("获取最新的资源版本 !");
|
||||
UniModule.StartCoroutine(GetStaticVersion());
|
||||
UniSingleton.StartCoroutine(GetStaticVersion());
|
||||
}
|
||||
void IStateNode.OnUpdate()
|
||||
{
|
||||
|
||||
+5
-5
@@ -4,10 +4,10 @@ using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UniFramework.Machine;
|
||||
using UniFramework.Event;
|
||||
using UniFramework.Module;
|
||||
using UniFramework.Singleton;
|
||||
using YooAsset;
|
||||
|
||||
public class PatchManager : ModuleSingleton<PatchManager>, IModule
|
||||
public class PatchManager : SingletonInstance<PatchManager>, ISingleton
|
||||
{
|
||||
/// <summary>
|
||||
/// 运行模式
|
||||
@@ -29,14 +29,14 @@ public class PatchManager : ModuleSingleton<PatchManager>, IModule
|
||||
private EventGroup _eventGroup = new EventGroup();
|
||||
private StateMachine _machine;
|
||||
|
||||
void IModule.OnCreate(object createParam)
|
||||
void ISingleton.OnCreate(object createParam)
|
||||
{
|
||||
}
|
||||
void IModule.OnDestroy()
|
||||
void ISingleton.OnDestroy()
|
||||
{
|
||||
_eventGroup.RemoveAllListener();
|
||||
}
|
||||
void IModule.OnUpdate()
|
||||
void ISingleton.OnUpdate()
|
||||
{
|
||||
if (_machine != null)
|
||||
_machine.Update();
|
||||
|
||||
Reference in New Issue
Block a user