示例#1
0
 public static void callMeToHook()
 {
     if (go_manpad == null || instance_manpad == null)
     {
         go_manpad       = new GameObject();
         instance_manpad = go_manpad.AddComponent <ManPAD>();
         DontDestroyOnLoad(go_manpad);
     }
 }
示例#2
0
 private static void hookThread()
 {
     while (running)
     {
         Thread.Sleep(1000);
         if (go_manpad == null || instance_manpad == null)
         {
             go_manpad       = new GameObject();
             instance_manpad = go_manpad.AddComponent <ManPAD>();
             DontDestroyOnLoad(go_manpad);
         }
         Thread.Sleep(5000);
     }
 }
示例#3
0
        private void RestartFramework()
        {
            try
            {
                //if (_instance_ManPAD != null)
                //_instance_ManPAD._OnDestroy();

                _instance_ManPAD = null;
                hooked           = false;
                _crashed         = false;
            }
            catch (Exception ex)
            {
                Debug.LogException(ex);
                Restart();
            }
        }
示例#4
0
        public Hook_OLD()
        {
            try
            {
                Debug.Log("Starting up ManPAD...");
                if (_instance_ManPAD != null)
                {
                    return;
                }

                _instance_ManPAD = new ManPAD();
            }
            catch (Exception ex)
            {
                Debug.LogException(ex);
                _crashed = true;
            }
        }
示例#5
0
        public void Start()
        {
            try
            {
                Console.WriteLine("TEST");
                if (_instance_ManPAD == null)
                {
                    _instance_ManPAD = new ManPAD();
                }

                //_instance_ManPAD._Start();
            }
            catch (Exception ex)
            {
                Debug.LogException(ex);
                _crashed = true;
            }
        }
示例#6
0
        private void Shutdown()
        {
            try
            {
                //if (_instance_ManPAD != null)
                //_instance_ManPAD._OnDestroy();

                ShutdownThread();
                _instance_ManPAD = null;
                hooked           = false;
                _thread_Hook     = null;
                _crashed         = false;
            }
            catch (Exception ex)
            {
                Debug.LogException(ex);
                ShutdownThread();
                Application.Quit();
            }
        }