Game: Reset speed on play again

parent a4922769
......@@ -7,8 +7,9 @@ namespace Assets.Scripts
{
public class GameController : MonoBehaviour
{
public static int PoolSize = 256;
public static float Speed = 4f;
public static int PoolSize = 256;
public static float InitialSpeed = 4f;
public static float Speed = InitialSpeed;
public GameObject Wall;
public GameObject BG;
......
......@@ -34,6 +34,7 @@ public class GameOver : MonoBehaviour
public void OnButtonPlayClicked()
{
GameController.Speed = GameController.InitialSpeed;
SceneManager.LoadScene("Main");
}
......
......@@ -55,6 +55,5 @@ public class UIController : MonoBehaviour
private void DisplayBattery()
{
Battery.sprite = BatteryImages[_player.Battery/8];
Progression.sprite = ProgressionSprites[_player.Progression / 5];
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment