private static void Postfix(SceneContext __instance)
        {
            SRGuu.OnGameLoaded(__instance);

            // ReSharper disable once ObjectCreationAsStatement
            new GameObject("SystemUpdater", typeof(SystemUpdater));
        }
Ejemplo n.º 2
0
        // PRE LOAD MOD
        public override void PreLoad()
        {
            // Gets the Assembly being executed
            execAssembly = Assembly.GetExecutingAssembly();
            HarmonyInstance.PatchAll(execAssembly);

            // Activates Guu services
            SRGuu.Init();

            // Sets up the mod
            VikDisk.SetupMod();
        }
        private IEnumerator TimedUpdate()
        {
            while (Levels.IsLevel(Levels.WORLD))
            {
                if (SceneContext.Instance.TimeDirector.HasPauser())
                {
                    yield return(new WaitWhile(SceneContext.Instance.TimeDirector.HasPauser));
                }

                SRGuu.OnGameTimedUpdate();

                yield return(new WaitForSeconds(5f));
            }
        }
        public static void Postfix(MainMenuUI __instance)
        {
            SRGuu.OnMainMenuLoaded(__instance);

            foreach (TMP_Text text in Resources.FindObjectsOfTypeAll <TMP_Text>())
            {
                if (text.GetComponentInParent <TMP_Dropdown>() != null)
                {
                    continue;
                }

                if (text.GetComponent <CustomLangSupport>() == null)
                {
                    text.gameObject.AddComponent <CustomLangSupport>();
                }
            }
        }
Ejemplo n.º 5
0
 // Makes a late setup of the remaining callbacks
 internal static void LateSetup()
 {
     // LANGUAGE LISTENERS
     SRGuu.RegisterTranslation(Main.execAssembly, LanguageHandler.FixLangDisplay);             //LanguageHandler.FixLangDisplay
 }
Ejemplo n.º 6
0
 private static void Postfix(ZoneDirector.Zone zone, PlayerState __instance)
 {
     SRGuu.OnZoneEntered(zone, __instance);
 }
 private static void Postfix(GameContext __instance)
 {
     SRGuu.OnGameContextReady(__instance);
 }
 private static void Prefix(SceneContext __instance)
 {
     SRGuu.OnPreLoadGame(__instance);
 }
 private void LateUpdate()
 {
     SRGuu.OnGameLateUpdate();
 }
 private void FixedUpdate()
 {
     SRGuu.OnGameFixedUpdate();
 }
 private void Update()
 {
     SRGuu.OnGameUpdate();
 }