// Update is called once per frame void Update() { background.SetSpeed(player.GetSpeed()); if (Input.GetKeyDown(KeyCode.Return)) { Instantiate(obstaclePrefab, spawner.transform); } /* * //if(floorCount < 3) * { * Instantiate(floorPrefab, spawner.transform).GetComponent<FloorBehavior>().Init(150, 20); * floorCount++; * } */ if (!gameOver) { GlobalClock.PrintTime(); if (player.abilityCooldown) { AbilityClock.PrintTime(); } } }