Exemplo n.º 1
0
    private void Start()
    {
        Screen.SetResolution(1280, 720, true);

        foodPool = FindObjectOfType <FoodPoolManager>();

        foodPool.Pooling();
        foodPool.Pooling();

        string   strFile  = string.Concat(Application.persistentDataPath, "/Score.txt");
        FileInfo fileInfo = new FileInfo(strFile);

        if (fileInfo.Exists)
        {
            LoadHighScore();
        }
        else
        {
            SaveHighScore();
        }

        startPanal.SetActive(true);
        inGamePanal.SetActive(false);

        canMovePlayer = false;

        highScoreText.text = string.Concat("HighScore : ", sc.highScore);
    }
Exemplo n.º 2
0
 private void Awake()
 {
     foodPool = FindObjectOfType <FoodPoolManager>();
 }