少年修仙传客户端代码仓库
hch
2025-06-12 204ef05a831c9484e2abc561d27ecbff7c797453
Utility/LogicEngine.cs
@@ -2,21 +2,8 @@
using System.Collections.Generic;
using UnityEngine;
public class LogicEngine : MonoBehaviour
public class LogicEngine : SingletonMonobehaviour<LogicEngine>
{
    public static LogicEngine Instance { get; private set; }
    [RuntimeInitializeOnLoadMethod]
    static void Init()
    {
        if (FindObjectOfType<LogicEngine>() == null)
        {
            var gameObject = new GameObject("LogicEngine");
            Instance = gameObject.AddMissingComponent<LogicEngine>();
            GameObject.DontDestroyOnLoad(gameObject);
        }
    }
    List<LogicUpdate> logicUpdates = new List<LogicUpdate>();
    public void Register(LogicUpdate logicUpdate)
    {