private void Validate() { #if !UNITY_EDITOR && !DEBUG_BUILD Addressables.ReleaseInstance(gameObject); #endif Debugging.DisplayDebugMessage("CHEATS ENABLED! \n Culprit: " + name); }
public void LoadMainGame() { Debugging.DisplayDebugMessage("Loading main game."); SceneTransitionManager.LoadGameScene(() => { userInterface.EnableInGameUserInterface(); SetActiveCamera(); }); }
public void LoadMainMenu() { Debugging.DisplayDebugMessage("Loading main menu."); userInterface.EnableGameOverMenu(false); SceneTransitionManager.LoadInitialisationScene(() => { userInterface.EnableStartMenu(); SetActiveCamera(); }); }
public static void DisappearAnimation(Transform popUpMenu, Action callBack = null) { if (popUpMenu == null) { Debugging.DisplayDebugMessage("There is no pop up menu assigned for this menu but you are still trying to animate it."); callBack?.Invoke(); return; } TransformExitLeft(popUpMenu, () => { callBack?.Invoke(); }); }
public static void AppearAnimation(Transform popUpMenu, Action callBack = null) { if (popUpMenu == null) { Debugging.DisplayDebugMessage("There is no pop up menu assigned for this menu but you are still trying to animate it."); callBack?.Invoke(); return; } popUpMenu.localPosition = new Vector3(-UserInterfaceManager.ScreenDistance, 0, 0); TransformEnterToScreenCentre(popUpMenu, () => { callBack?.Invoke(); }); }
private void ConvertPoolListIntoQueue() { foreach (var pool in pools) { var objectPool = new Queue <GameObject>(); for (var i = 0; i < pool.maximumActiveObjects; i++) { var temporaryVariable = Instantiate(pool.prefab); temporaryVariable.SetActive(false); objectPool.Enqueue(temporaryVariable); } if (PoolDictionary.ContainsKey(pool.index)) { Debugging.DisplayDebugMessage("Replacing object pool " + pool.index + ". "); PoolDictionary.Remove(pool.index); } PoolDictionary.Add(pool.index, objectPool); } }