コード例 #1
0
ファイル: BPMScript.cs プロジェクト: SweGuitar10/GameJam2020
 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>();
 }
コード例 #2
0
ファイル: GameLogic.cs プロジェクト: SweGuitar10/GameJam2020
    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;
    }