Esempio n. 1
0
    void SetHiScore(int newHiScore)
    {
        //Change HUD
        hiScore          = newHiScore;
        hiScoreText.text = HelperFs.ScoreFormat(hiScore);

        //Change Player prefs
        PlayerPrefs.SetInt("hiScore", hiScore);
    }
    private void Start()
    {
        CanvasScaler cs = GetComponent <CanvasScaler>();

        cs.referenceResolution = new Vector2(Screen.width, Screen.height);

        //"HI-Score : 5430"
        hiScoreText.text = "HI-Score : " + HelperFs.ScoreFormat(GetHighScore());
    }
Esempio n. 3
0
    void InitHUD()
    {
        hiScore                = PlayerPrefs.GetInt("hiScore", 0);
        hiScoreText.text       = HelperFs.ScoreFormat(hiScore);
        remainingLifeText.text = remainingLife.ToString();

        fastMovementTimeT = PowerUpsParent.GetChild(0);
        doubleBarrelTimeT = PowerUpsParent.GetChild(1);
        fastShootTimeT    = PowerUpsParent.GetChild(2);
    }
Esempio n. 4
0
    internal void AddScore(int add)
    {
        score += add;
        if (score > hiScore)
        {
            SetHiScore(score);
        }

        //Change HUD
        scoreText.text = HelperFs.ScoreFormat(score);
    }