예제 #1
0
    /// Can't use Start() because splash screen means the game runs behind >:(
    public void StartAfterSplashscreen()
    {
        UIController = GetComponent <UIControl>();
        SetupSlots();
        UIController.SetupScoreText();

        UIController.ShowTitle();
        string nextMethod;

        if (PlayerPrefs.GetInt("HasCompletedARound", 0) == 0)
        {
            // if is first run go straight into a timed round
            gameMode   = Mode.Timed;
            nextMethod = "StartRound";
        }
        else
        {
            // otherwise allow the player to select timed or lives modes
            nextMethod = "ShowModeSelectScreen";
        }
        Invoke(nextMethod, UIController.titleAnimateTime * 1.5f + UIController.titleDisplayTime + gameStartDelay);

        sfx = GetComponent <Sounds>();

        LBHandler = GetComponent <LeaderboardHandler>();
    }
예제 #2
0
        private static void callSaveChanges(object sender, ElapsedEventArgs e)
        {
            LeaderboardHandler leaderboardHandler = new LeaderboardHandler();
            ResultsHandler     resultsHandler     = new ResultsHandler();

            resultsHandler
            .DoWork()
            .ContinueWith(async(prevTask) => { await leaderboardHandler.DoWork(); });
        }
예제 #3
0
    // private LeaderboardDataRequest leaderboardDataRequest;
    //private LogEventRequest logEventRequest;


    void Awake ()
    {
        if (instance != null){

            Destroy(gameObject);
            return;
        }
        instance = this;
        dreamloRef = dreamloLeaderBoard.Instance;
        // leaderboardDataRequest =  new LeaderboardDataRequest();
        //logEventRequest =  new LogEventRequest();
        DontDestroyOnLoad(gameObject);     
    }
예제 #4
0
    public void UploadScore()
    {
        if (string.IsNullOrEmpty(_inputField.text))
        {
            return;
        }

        LeaderboardHandler.UploadScore(_inputField.text, _score.Value);
        _inputField.interactable = false;
        _button.GetComponentInChildren <TextMeshProUGUI>().text  = "Uploaded";
        _button.GetComponentInChildren <TextMeshProUGUI>().color = Color.green;
        _button.interactable = false;
    }
예제 #5
0
	/// Can't use Start() because splash screen means the game runs behind >:(
	public void StartAfterSplashscreen () {
		UIController = GetComponent<UIControl>();
		SetupSlots();
		UIController.SetupScoreText();
		
		UIController.ShowTitle();
		string nextMethod;
		if (PlayerPrefs.GetInt("HasCompletedARound", 0) == 0) {
			// if is first run go straight into a timed round
			gameMode = Mode.Timed;
			nextMethod = "StartRound";
		} else {
			// otherwise allow the player to select timed or lives modes
			nextMethod = "ShowModeSelectScreen";
		}
		Invoke(nextMethod, UIController.titleAnimateTime * 1.5f + UIController.titleDisplayTime + gameStartDelay);
		
		sfx = GetComponent<Sounds>();
		
		LBHandler = GetComponent<LeaderboardHandler>();
	}
 private void Awake()
 {
     leaderboardHandler = FindObjectOfType <LeaderboardHandler>();
 }
예제 #7
0
 private void AddScoreToLeaderBoard(string input)
 {
     LeaderboardHandler.AddNewHighscore(input, CurrentScore);
 }
 private void Awake()
 {
     instance = this;
 }