Example #1
0
 void Start()
 {
     ScoreMgr.load();
     loudslider.value = PlayerPrefs.GetFloat("volume");
     audioMgr.UpdVolume();
     UpdMuter();
 }
Example #2
0
    // Start is called before the first frame update
    void Start()
    {
        scoreObject = GameObject.Find("ScoreMgr");
        scoreScript = scoreObject.GetComponent <ScoreMgr>();


        destroyFlag = false;
    }
Example #3
0
 private void Awake()
 {
     if (s_instance != null)
     {
         return;
     }
     s_instance = this;
 }
 private void Awake()
 {
     instance = this;
     //score = DataManager.Instance.curUserCoins;
     score          = PlayerPrefs.GetInt(DataManager.Instance.curUserName + "Coins");
     score_1        = PlayerPrefs.GetInt(DataManager.Instance.curUserName + "Scores");
     scoreText.text = score.ToString();
     //score_1 = DataManager.Instance.curUserScore;
     scoreText_1.text = score_1.ToString();
 }
 public void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(this);
     }
 }
Example #6
0
 public void Awake()
 {
     // only keep the first copy of this script around
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(this);
     }
 }
Example #7
0
    // Start is called before the first frame update
    void Start()
    {
        audio = gameObject.GetComponent <AudioSource>();
        GameObject sfxvolume = GameObject.Find("AudioController");

        if (sfxvolume)
        {
            audio.volume = sfxvolume.GetComponent <AudioController>().SFXVolume / 100.0f;
        }
        audio.Play();
        ScoreMgr = GameObject.Find("GameManager").GetComponent <ScoreMgr>();
        CreateBlock();
    }
Example #8
0
    // Start is called before the first frame update
    void Start()
    {
        gameMode = GameModeScene.Start;

        countdownObject = GameObject.Find("Countdown");
        countdownScript = countdownObject.GetComponent <TimerControl>();

        tmpScoreObject = GameObject.Find("ScoreMgr");
        scoreScript    = tmpScoreObject.GetComponent <ScoreMgr>();

        resultScore.enabled = false;
        resultText1.enabled = false;
        resultText2.enabled = false;
        returnTitle.enabled = false;

        gameScore.enabled = true;
        gameTime.enabled  = true;
    }
Example #9
0
 private void Awake()
 {
     _rigidBody = GetComponent <Rigidbody>();
     _scoreMgr  = GetComponent <ScoreMgr>();
     Reset();
 }
Example #10
0
    void Awake()
    {
        instance = this;

        highScore = PlayerPrefs.GetInt(highscoreKey, 0); //저장된 값 받아옴
    }