Example #1
0
 void Awake()
 {
     if (_instance == null)
     {
         _instance = this;
     }
 }
    void Awake()
    {
        if (PlayerPrefs.GetInt("HasHacked", 0) == 1)
        {
            privateCode = "F**K OFF";
            publicCode  = "F**K OFF";
            PlayerPrefs.SetString("MyID", "000000000");
        }
        highscoreDisplay = GetComponent <DisplayHighscores>();
        instance         = this;

        if (string.IsNullOrEmpty(PlayerPrefs.GetString("MyID")))
        {
            myId = GenerateId();
            PlayerPrefs.SetString("MyID", myId);
        }
        else
        {
            myId = PlayerPrefs.GetString("MyID");
        }
        if (string.IsNullOrEmpty(PlayerPrefs.GetString("MyName")))
        {
            myName = "NoName";
        }
        else
        {
            myName = PlayerPrefs.GetString("MyName");
        }


        print("ID: " + myId + " Name: " + myName);

        DownloadMyHighscore();
        //MUSTBEDELETED();
    }
Example #3
0
    void Awake()
    {
        instance = this;

        if (SceneManager.GetActiveScene().name == "LeaderboardScene")
        {
            displayHighscores = GetComponent <DisplayHighscores>();
        }
    }
Example #4
0
 void Awake()
 {
     instance       = this;
     instance.scene = SceneManager.GetActiveScene().name;
     if (instance.scene != "MainGame" && instance.scene != "Settings")
     {
         highscoreDisplay = GetComponent <DisplayHighscores>();
     }
     if (instance.scene == "Settings")
     {
         scoreSheet = GetComponent <ScoreSheet>();
     }
 }
 private void Awake()
 {
     /*if (instance != null && instance != this)
      * {
      *  Destroy(gameObject);
      * }
      * else
      * {
      *  instance = this;
      * // DontDestroyOnLoad(gameObject);
      * }*/
     instance          = this;
     highscoresDisplay = GetComponent <DisplayHighscores>();
 }
Example #6
0
    void Start()
    {
        nameText.text = PlayerPrefs.GetString("MyName");
        masterMixer.GetFloat("musicVol", out normalMusicVol);
        masterMixer.GetFloat("soundVol", out normalSoundVol);
        displayHighscores = GetComponent <DisplayHighscores>();

        ToggleMenu(isMenu);


        //Advanced Stuff
        displayHighscores.ToggleDisplay(string.IsNullOrEmpty(PlayerPrefs.GetString("MyName")));
        CheckButtons();


        LoadMenu();
        CheckButtons();
    }
Example #7
0
 void Awake()
 {
     highscoreDisplay = GetComponent <DisplayHighscores>();
     instance         = this;
 }
Example #8
0
 private void Awake()
 {
     instance          = this;
     highscoresDisplay = GetComponent <DisplayHighscores>();
 }
Example #9
0
 void Awake()
 {
     highscoresDisplay = GetComponent <DisplayHighscores>();
 }
 void Awake()
 {
     instance = this;
     highscoresDisplay = GetComponent<DisplayHighscores>();
 }
Example #11
0
 void Awake()
 {
     Instance  = this;
     displayHS = GetComponent <DisplayHighscores>();
 }
Example #12
0
    // Start is called before the first frame update

    protected override void Awake()
    {
        this.IsPersistentBetweenScenes = false;
        highscoreDisplay = GetComponent <DisplayHighscores>();
        base.Awake();
    }
Example #13
0
 void Awake()
 {
     DownloadHighscores();
     highscoreDisplay = GetComponent <DisplayHighscores>();
     instance         = this;
 }
Example #14
0
 private void Awake()
 {
     instance = this;
 }
Example #15
0
 void Awake()
 {
     highscoresDisplay = GetComponent<DisplayHighscores>();
 }