Esempio n. 1
0
 // Use this for initialization
 void Awake()
 {
     speedY          = -6.0f;
     SM_Script       = GameObject.FindWithTag("SoundManager").gameObject.GetComponent <SoundManagerScript>();
     GM_Script       = GameObject.FindWithTag("GameManager").gameObject.GetComponent <GMRacing>();
     GerryCan_Script = GameObject.FindWithTag("GerryCanManager").gameObject.GetComponent <GerryCanManager>();
     QM_Script       = GameObject.FindWithTag("QuestionManager").gameObject.GetComponent <QMRacing>();
     firstNum        = transform.GetChild(0).GetComponent <SpriteRenderer>();
     secondNum       = transform.GetChild(1).GetComponent <SpriteRenderer>();
 }
Esempio n. 2
0
    // public static GMRacing instance = null;

    void Awake()
    {
        // if (instance == null)
        // {
        //     instance = this;
        // }
        //  else if (instance != this)
        // {
        //      Destroy(gameObject);
        //  }
        //  Setup();

        QM_Script       = GameObject.FindWithTag("QuestionManager").gameObject.GetComponent <QMRacing>();
        SM_Script       = GameObject.FindWithTag("SoundManager").gameObject.GetComponent <SoundManagerScript>();
        GerryCan_Script = GameObject.FindWithTag("GerryCanManager").gameObject.GetComponent <GerryCanManager>();
        loadingScreen.SetActive(false);
        loadingAnimation.SetActive(false);
        isGerryCanAvailable = true;
        isQuestionStarted   = false;
        lives      = 5;
        checkpoint = 100;
        score      = 0;
    }