Ejemplo n.º 1
0
 private void Validate()
 {
     #if !UNITY_EDITOR && !DEBUG_BUILD
     Addressables.ReleaseInstance(gameObject);
     #endif
     Debugging.DisplayDebugMessage("CHEATS ENABLED! \n Culprit: " + name);
 }
Ejemplo n.º 2
0
 public void LoadMainGame()
 {
     Debugging.DisplayDebugMessage("Loading main game.");
     SceneTransitionManager.LoadGameScene(() =>
     {
         userInterface.EnableInGameUserInterface();
         SetActiveCamera();
     });
 }
Ejemplo n.º 3
0
 public void LoadMainMenu()
 {
     Debugging.DisplayDebugMessage("Loading main menu.");
     userInterface.EnableGameOverMenu(false);
     SceneTransitionManager.LoadInitialisationScene(() =>
     {
         userInterface.EnableStartMenu();
         SetActiveCamera();
     });
 }
Ejemplo n.º 4
0
 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();
     });
 }
Ejemplo n.º 5
0
        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();
            });
        }
Ejemplo n.º 6
0
    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);
        }
    }