Esempio n. 1
0
 private void warmUp()
 {
     // warm up not GUI dependant elements in case they don't exist yet
     TouchEventManager.warm();
     // warm up Pause manager
     PauseGameManager.warm();
 }
Esempio n. 2
0
 public static void warm()
 {
     // in case the class wasn't instantiated yet from another script
     if (instance == null)
     {
         // creates the innner instance
         instance = new PauseGameManager();
     }
 }
Esempio n. 3
0
 private void Awake()
 {
     if (instance != null)
     {
         Logs.LogW("More than one Pause Game Manager");
         return;
     }
     instance = this;
 }
Esempio n. 4
0
    private void Awake()
    {
        singleTon = this;
        Button_Pause.onClick.AddListener(() => { PauseActivate(true); });
        Button_Unpause.onClick.AddListener(() => { PauseActivate(false); });
        Button_MainMenu.onClick.AddListener(ReturnToMainMenu);

        if (_achieveentManagement == null)
        {
            _achieveentManagement = Behaviour.FindObjectOfType <AchievementsManagement>();
        }
    }
Esempio n. 5
0
 void Awake()
 {
     paused = false;
     if (instance != null && instance != this)
     {
         Destroy(this.gameObject);
     }
     else
     {
         instance = this;
         DontDestroyOnLoad(gameObject);
     }
 }
Esempio n. 6
0
    private void Awake()
    {
        if (_instance != null && _instance != this)
        {
            Destroy(this);
            return;
        }

        _instance = this;

        Cursor.lockState = CursorLockMode.Locked;
        Cursor.visible   = false;

        Time.timeScale = 1f;

        GameStateManager.SetGameState(GameState.GameRunning);
    }
Esempio n. 7
0
 void OnDestroy()
 {
     sceneOnly.Clear();
     durables.Clear();
     instance = null;
 }
Esempio n. 8
0
 //prepare the self reference
 void Awake()
 {
     _self = this;
 }