예제 #1
0
    // Use this for initialization
    void Start()
    {
        erreur       = GOerreur.GetComponent <Script_Gui>();
        currentScene = SceneManager.GetActiveScene();
        indexScene   = currentScene.buildIndex;
        if (indexScene == 0)
        {
            BPM = 170;
        }
        if (indexScene == 1)
        {
            BPM = 170;
        }
        if (indexScene == 2)
        {
            BPM = 120;
        }
        if (indexScene == 3)
        {
            BPM = 135;
        }
        musique      = instruments.GetComponent <AudioSource>();
        couleur      = GetComponent <SpriteRenderer>();
        tampon       = Variables.GetComponent <TamponCompteur>(); //Pour gerer le compteur, le tampon, et musiquePlay
        spriteInstru = instruments.GetComponent <SpriteRenderer>();

        timeBPM            = 60.0f / BPM;
        spriteInstru.color = Color.gray;
    }
예제 #2
0
 // Use this for initialization
 void Start()
 {
     tampon        = variable.GetComponent <TamponCompteur>();
     classe        = Parent_BtnPlay.GetComponent <Play_Parent>();
     musique       = Play.GetComponent <AudioSource>();
     script_play   = btnPlay.GetComponent <Script_Play>();
     couleurInstru = Play.GetComponent <SpriteRenderer>();
 }
예제 #3
0
 public void Start()
 {
     tampon = Variable.GetComponent <TamponCompteur>();
     erreur = GOerreur.GetComponent <Script_Gui>();
 }