Exemple #1
0
 private void Start()
 {
     if (bpmScriptInstance != null && bpmScriptInstance != this)
     {
         Destroy(this.gameObject);
     }
     else
     {
         bpmScriptInstance = this;
     }
     player    = GameObject.Find("Player");
     gameOver  = player.GetComponentInParent <GameOver>();
     spawnWall = player.GetComponent <SpawnWall>();
 }
Exemple #2
0
    void Start()
    {
        gameOver  = gameObject.GetComponentInChildren <GameOver>();
        spawnWall = gameObject.GetComponentInChildren <SpawnWall>();
        points    = gameObject.GetComponentInChildren <Points>();
        bpmScript = GameObject.Find("BPM").GetComponent <BPMScript>();
        move      = gameObject.GetComponentInChildren <Movement>();
        sound     = gameObject.GetComponentInChildren <SoundScripts>();

        partSys = GameObject.Find("ParticleSystems");
        partSys.gameObject.SetActive(false);

        bpmScript.bpm       = 70f;
        spawnWall.spawnDist = 150f;
    }