Example #1
0
    // Use this for initialization
    void Start()
    {
        tsm = TopScoreManager.instance;

        bNamesQ = new Queue <string>();
        bScoreQ = new Queue <int>();

        clearMin   = (int)(GameRecord.GetCompleteTime() / 60);
        clearSec   = (int)(GameRecord.GetCompleteTime() % 60);
        _baseScore = (int)(600 - GameRecord.GetCompleteTime());

        if (_baseScore < 0)
        {
            _baseScore = 0;
        }

        totalScore = _baseScore;

        showBaseScore  = false;
        showTotalScore = false;

        clearTimeText.SetActive(true);
        clearTime.text = clearMin.ToString() + "min " + clearSec.ToString() + "sec";

        CheckBonus();
    }
Example #2
0
    private void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }

        else if (instance != this)
        {
            Destroy(gameObject);
        }
    }
Example #3
0
    // Use this for initialization
    void Start()
    {
        button = GetComponent <Button>();
        tsm    = TopScoreManager.instance;

        _userInput = "";
        submitted  = false;

        if (button != null)
        {
            button.onClick.AddListener(SubmitUserInput);
        }
    }
Example #4
0
    // Use this for initialization
    void Start()
    {
        List <int> scores = TopScoreManager.GetTopScores();

        for (int i = 0; i < 6; i++)
        {
            ScoresTexts[i].text = scores[i].ToString();
        }

        if (TopScoreManager.GetScorePosition() >= 0 && !SceneManager.GetActiveScene().name.Equals("Main Menu"))
        {
            ScoresTexts[TopScoreManager.GetScorePosition()].color = Color.yellow;
        }

        TopScoreManager.ResetTempValues();
    }
Example #5
0
 public void Hitted()
 {
     Lives--;
     if (Lives < 0)
     {
         if (TopScoreManager.IsTopScore(_scoreText.GetScore()))
         {
             Time.timeScale = 1;
             TopScoreManager.SetScore(_scoreText.GetScore());
             TopScoreManager.SaveScores();
             _levelManager.LoadLevel("TopScore");
         }
         else
         {
             Time.timeScale = 1;
             _levelManager.LoadLevel("Lose");
         }
     }
     else
     {
         LifeText.text = Lives.ToString();
     }
 }
Example #6
0
 // Use this for initialization
 void Start()
 {
     tsm = TopScoreManager.instance;
 }
 // Use this for initialization
 void Start()
 {
     TopScoreManager.LoadScores();
     _levelManager = FindObjectOfType <LevelManager>();
     Invoke("LoadMainMenu", 3);
 }