예제 #1
0
    private void Awake()
    {
        if (instance == null)
        {
            instance    = this;
            _hudManager = FindObjectOfType <CHudManager>();
            highScore   = PlayerPrefs.GetInt("HighScore", 0);
        }
        else if (instance != this)
        {
            Destroy(gameObject);
        }

        DontDestroyOnLoad(gameObject);
    }
예제 #2
0
 private void OnLevelWasLoaded(int level)
 {
     _hudManager = FindObjectOfType <CHudManager>();
 }