public void Awake() { if (!awakened) { StaticInits.Start(); SaveLoad.Start(); new ControlPanel(); new PlayerCharacter(); SaveLoad.LoadAlMighty(); LuaScriptBinder.Set(null, "ModFolder", DynValue.NewString("@Title")); UnitaleUtil.AddKeysToMapCorrespondanceList(); //Use AlMightyGlobals to load Crate Your Frisk, Safe Mode, Retromode and Fullscreen mode preferences if (LuaScriptBinder.GetAlMighty(null, "CrateYourFrisk") != null && LuaScriptBinder.GetAlMighty(null, "CrateYourFrisk").Boolean) { crate = true; } #if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN Misc.WindowName = crate ? ControlPanel.instance.WinodwBsaisNmae : ControlPanel.instance.WindowBasisName; #endif //Check if safe mode has a stored preference that is a boolean if (LuaScriptBinder.GetAlMighty(null, "CYFSafeMode") != null && LuaScriptBinder.GetAlMighty(null, "CYFSafeMode").Type == DataType.Boolean) { ControlPanel.instance.Safe = LuaScriptBinder.GetAlMighty(null, "CYFSafeMode").Boolean; } //Check if retro mode has a stored preference that is a boolean if (LuaScriptBinder.GetAlMighty(null, "CYFRetroMode") != null && LuaScriptBinder.GetAlMighty(null, "CYFRetroMode").Type == DataType.Boolean) { retroMode = LuaScriptBinder.GetAlMighty(null, "CYFRetroMode").Boolean; } //Check if fullscreen mode has a stored preference that is a boolean if (LuaScriptBinder.GetAlMighty(null, "CYFPerfectFullscreen") != null && LuaScriptBinder.GetAlMighty(null, "CYFPerfectFullscreen").Type == DataType.Boolean) { ScreenResolution.perfectFullscreen = LuaScriptBinder.GetAlMighty(null, "CYFPerfectFullscreen").Boolean; } //Check if window scale has a stored preference that is a number if (LuaScriptBinder.GetAlMighty(null, "CYFWindowScale") != null && LuaScriptBinder.GetAlMighty(null, "CYFWindowScale").Type == DataType.Number) { ScreenResolution.windowScale = (int)LuaScriptBinder.GetAlMighty(null, "CYFWindowScale").Number; } awakened = true; } }
void LoadScene(Scene scene, LoadSceneMode mode) { if (LuaScriptBinder.GetAlMighty(null, "CrateYourFrisk") != null) { crate = LuaScriptBinder.GetAlMighty(null, "CrateYourFrisk").Boolean; } else { crate = false; } }
private void Start() { if (!initial) { StaticInits.Start(); SaveLoad.Start(); new ControlPanel(); new PlayerCharacter(); #if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN if (GlobalControls.crate) { Misc.WindowName = ControlPanel.instance.WinodwBsaisNmae; } else { Misc.WindowName = ControlPanel.instance.WindowBasisName; } #endif SaveLoad.LoadAlMighty(); LuaScriptBinder.Set(null, "ModFolder", DynValue.NewString("@Title")); UnitaleUtil.AddKeysToMapCorrespondanceList(); initial = true; } if (LuaScriptBinder.GetAlMighty(null, "CrateYourFrisk") != null) { if (LuaScriptBinder.GetAlMighty(null, "CrateYourFrisk").Boolean) { GameObject.Find("Image").GetComponent <Image>().enabled = false; GameObject.Find("Image (1)").GetComponent <Image>().enabled = true; /*GameObject.Find("Description").GetComponent<Text>().text = "CRATE YOUR FRISK IS A FERE AND SUPER KEWL EJNINE!!!!1!!\n" + * "GO ON WWW.REDIDT.CMO/R/UNITLAE. FOR UPDTAES!!!!!\n" + * "NO RELESLING HERE!!! IT'S RFEE!!!\n" + * "OR TUBY FEX WILL BE ANGER!!!\n\n" + * "U'LL HVAE A BED TMIE!!!"; * GameObject.Find("Description (1)").GetComponent<Text>().text = "NU FEAUTRES IN EXAMPLES MODS!!!!! CHEKC IT OTU!!!!!\n" + * "REALLY!!!\n" + * "IF U DAD A # IN AN ECNOUNTRE NAME IT'LL NTO BE CHOSE NI\n" + * "ENCONUTERS ON THE PAMS!!!! SO COLO!!!";*/ GameObject.Find("Description").GetComponent <Text>().text = "GO TO /R/UNITLAE. FOR UPDTAES!!!!!"; GameObject.Find("Description (1)").GetComponent <Text>().text = "NO RELESLING HERE!!! IT'S RFEE!!! " + "OR TUBY FEX WILL BE ANGER!!! " + "U'LL HVAE A BED TMIE!!!"; GameObject.Find("Description (2)").GetComponent <Text>().text = "SPACE OR KLIK TO\n<color='#ff0000'>PALY MODS!!!!!</color>"; GameObject.Find("Description (3)").GetComponent <Text>().text = "PRSES O TO\n<color='#ffff00'>OOVERWURL!!!!!</color>"; GameObject.Find("Description (4)").GetComponent <Text>().text = "<b><color='red'>KNOW YUOR CODE</color> R U'LL HVAE A BED TMIE!!!</b>"; } } }
// Use this for initialization public static void Start() { // Creates the object that manages the Rich Presence Commands. The first argument is the APPID, the second tells the libraries if Discord must be started or not. try { discord = new Discord.Discord(711497963771527219, (ulong)CreateFlags.NoRequireDiscord); activityManager = discord.GetActivityManager(); isActive = true; } catch (Exception) { isActive = false; } // Gets Discord Visibility Setting if (LuaScriptBinder.GetAlMighty(null, "CYFDiscord") == null) { curr_setting = 0; } else { curr_setting = (int)LuaScriptBinder.GetAlMighty(null, "CYFDiscord").Number; } // Creates the activity objects that will be modified and used as needed activity = new Activity { Name = GlobalControls.crate ? ControlPanel.instance.WinodwBsaisNmae : ControlPanel.instance.WindowBasisName, Details = "", // The top row State = "", // The second row Timestamps = // The timer { Start = 0, End = 0 }, Assets = // The CYF Logo { LargeImage = "cyf_logo", LargeText = ControlPanel.instance.WindowBasisName } }; // Set initial activity properties and status ChangeVisibilitySetting(0); oldTime = GetCurrentTime(); ClearTime(true); StartTitle(); }
void Awake() { if (!awakened) { SceneManager.sceneLoaded += LoadScene; // use AlMightyGlobals to load Safe Mode, Retromode and Fullscreen mode preferences // check if safe mode has a stored preference that is a boolean if (LuaScriptBinder.GetAlMighty(null, "CYFSafeMode") != null && LuaScriptBinder.GetAlMighty(null, "CYFSafeMode").Type == DataType.Boolean) { ControlPanel.instance.Safe = LuaScriptBinder.GetAlMighty(null, "CYFSafeMode").Boolean; } // check if retro mode has a stored preference that is a boolean if (LuaScriptBinder.GetAlMighty(null, "CYFRetroMode") != null && LuaScriptBinder.GetAlMighty(null, "CYFRetroMode").Type == DataType.Boolean) { retroMode = LuaScriptBinder.GetAlMighty(null, "CYFRetroMode").Boolean; } // check if fullscreen mode has a stored preference that is a boolean if (LuaScriptBinder.GetAlMighty(null, "CYFPerfectFullscreen") != null && LuaScriptBinder.GetAlMighty(null, "CYFPerfectFullscreen").Type == DataType.Boolean) { perfectFullscreen = LuaScriptBinder.GetAlMighty(null, "CYFPerfectFullscreen").Boolean; } // check if window scale has a stored preference that is a number if (LuaScriptBinder.GetAlMighty(null, "CYFWindowScale") != null && LuaScriptBinder.GetAlMighty(null, "CYFWindowScale").Type == DataType.Number) { windowScale = (int)LuaScriptBinder.GetAlMighty(null, "CYFWindowScale").Number; } awakened = true; } }
private static bool awakened; // Used to only run Awake() once public void Awake() { if (awakened) { return; } // Create all singletons (classes that only have one instance across the entire app) StaticInits.Start(); SaveLoad.Start(); new ControlPanel(); new PlayerCharacter(); // Load AlMighty globals SaveLoad.LoadAlMighty(); LuaScriptBinder.Set(null, "ModFolder", DynValue.NewString("@Title")); // Load map names for the overworld UnitaleUtil.AddKeysToMapCorrespondanceList(); // Use AlMightyGlobals to load Crate Your Frisk, Safe Mode, Retromode and Fullscreen mode preferences // CrateYourFrisk if (LuaScriptBinder.GetAlMighty(null, "CrateYourFrisk") != null && LuaScriptBinder.GetAlMighty(null, "CrateYourFrisk").Boolean) { crate = true; } #if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN Misc.WindowName = crate ? ControlPanel.instance.WinodwBsaisNmae : ControlPanel.instance.WindowBasisName; #endif // Check if safe mode has a stored preference that is a boolean if (LuaScriptBinder.GetAlMighty(null, "CYFSafeMode") != null && LuaScriptBinder.GetAlMighty(null, "CYFSafeMode").Type == DataType.Boolean) { ControlPanel.instance.Safe = LuaScriptBinder.GetAlMighty(null, "CYFSafeMode").Boolean; } // Check if retro mode has a stored preference that is a boolean if (LuaScriptBinder.GetAlMighty(null, "CYFRetroMode") != null && LuaScriptBinder.GetAlMighty(null, "CYFRetroMode").Type == DataType.Boolean) { retroMode = LuaScriptBinder.GetAlMighty(null, "CYFRetroMode").Boolean; } // Check if fullscreen mode has a stored preference that is a boolean if (LuaScriptBinder.GetAlMighty(null, "CYFPerfectFullscreen") != null && LuaScriptBinder.GetAlMighty(null, "CYFPerfectFullscreen").Type == DataType.Boolean) { ScreenResolution.perfectFullscreen = LuaScriptBinder.GetAlMighty(null, "CYFPerfectFullscreen").Boolean; } // Check if window scale has a stored preference that is a number if (LuaScriptBinder.GetAlMighty(null, "CYFWindowScale") != null && LuaScriptBinder.GetAlMighty(null, "CYFWindowScale").Type == DataType.Number) { ScreenResolution.windowScale = (int)LuaScriptBinder.GetAlMighty(null, "CYFWindowScale").Number; } // Start Discord RPC (also checks for an AlMightyGlobal within) DiscordControls.Start(); awakened = true; }