mirror of
https://github.com/Ratstail91/Keep-It-Alive.git
synced 2025-11-29 02:24:27 +11:00
Mostly finished, just needs sound, polish and hosting online
This commit is contained in:
@@ -1,13 +1,20 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class LevelController : MonoBehaviour {
|
||||
public float globalLightLevel = 1f;
|
||||
public float increment = 0f;
|
||||
|
||||
public int globalWood = 0;
|
||||
|
||||
void FixedUpdate() {
|
||||
globalLightLevel += increment;
|
||||
globalLightLevel = Mathf.Clamp(globalLightLevel, 0, 1);
|
||||
|
||||
if (globalLightLevel == 0) {
|
||||
SceneManager.LoadScene("FireGoesOut");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user