//更新 public virtual void Update(float elapseSeconds, float realElapseSeconds) { if (!IsGameOver && m_MyAircraft != null && m_MyAircraft.IsDead) { IsGameOver = true; HotLog.Debug("玩家死亡,游戏结束"); return; } }
public static void ApplicationQuit() { try { ObjectPool.Shutdown(); ReferencePool.ClearAll(); HotLog.Debug("Hotfix ApplicationQuit..."); } catch (Exception) { throw; } }
public static void Start(GameObject frameObj) { HotLog.Debug("热更新启动"); GlobalObj = frameObj; ObjectPool = new ObjectPoolManager(); HPBar = new HPBarComponent(); //注册回调函数 GameEntry.Hotfix.OnUpdate = Update; GameEntry.Hotfix.OnLateUpdate = LateUpdate; GameEntry.Hotfix.OnApplication = ApplicationQuit; }