Large diffs are not rendered by default.

@@ -6,33 +6,34 @@ public class GameController : MonoBehaviour {

public static GameController instance;
public bool gameOver = false;
public int deaths = 0;

public bool paused = false;
public string curBody;
public bool earthDefeated = false;

public HealthStamDisplay healthDisplay;

void Awake() {
if (instance == null) instance = this;
else if (instance != this) Destroy(gameObject);

}

// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {
if (healthDisplay.playerHealth < 0) gameOver = true;
if (!gameOver && Input.GetKeyDown(KeyCode.P)) {
if (!paused) {
paused = true;
Time.timeScale = 0;
} else {
}
else {
paused = false;
Time.timeScale = 1;
}
}
}

// Update is called once per frame
void Update () {

}
}
}
@@ -0,0 +1,16 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class LennyController : MonoBehaviour {

// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {

}
}
@@ -0,0 +1,46 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class HealthStamDisplay : MonoBehaviour {

public int startingHealth;
int maxStamina = 100;
public int startingStamina;
public float staminaRecover = 1f;
[HideInInspector] public float playerHealth; //current player hp
[HideInInspector] public float playerStamina;
public Slider healthSlider;
public Slider staminaSlider;
public bool dead;

// Use this for initialization
void Start () {
playerHealth = startingHealth;
playerStamina = startingStamina;
healthSlider.value = startingHealth;
staminaSlider.value = startingStamina;
StartCoroutine(StaminaRegen());
}

// Update is called once per frame
void Update () {

}

public void TakeDamage(int amount) {
playerHealth -= amount;
healthSlider.value = playerHealth;
if (playerHealth < 0) dead = true;
}

private IEnumerator StaminaRegen() {
if (playerStamina < maxStamina) {
playerStamina += staminaRecover;
staminaSlider.value = playerStamina;
yield return new WaitForSeconds(4);
}

}
}