Resolved many merge conflicts

This commit is contained in:
Evan Nydahl
2021-12-03 13:55:32 -06:00
parent e0cfb655f8
commit 36da5ec848
11 changed files with 28 additions and 255 deletions

View File

@@ -11,26 +11,27 @@ public class Nitro : MonoBehaviour
private float coolDown;
// Start is called before the first frame update
void Start(){
void Start()
{
playerStats = GetComponent<PlayerStats>();
coolDown = 5.0f;
//retrieves
driver = FindObjectOfType<CoolDown>();
}
//// Update is called once per frame
//void Update(){
// //once cooldowns are implemented, put this on one (a long one)
// if (Input.GetKeyDown(KeyCode.LeftShift) && isOnCoolDown == false){
// playerStats.CurVel = playerStats.MaxVel;
// StartCoroutine(startCoolDown());
// }
//}
//private IEnumerator startCoolDown(){
// Debug.Log("start corotine");
// isOnCoolDown = true;
// Update is called once per frame
void Update()
{
//once cooldowns are implemented, put this on one (a long one)
if (Input.GetKeyDown(KeyCode.LeftShift) && isOnCoolDown == false)
{
playerStats.CurVel = playerStats.MaxVel;
StartCoroutine(startCoolDown());
}
}
private IEnumerator startCoolDown(){
Debug.Log("start corotine");
isOnCoolDown = true;
// driver.startUICooldown("Nitro");
// yield return new WaitForSeconds(coolDown);
// isOnCoolDown = false;
//}
yield return new WaitForSeconds(coolDown);
isOnCoolDown = false;
}
}