Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function checkKeyPress() {
- if(Event.current.type == EventType.KeyDown) {
- if(Event.current.keyCode == KeyCode.LeftControl) {
- health = 10000;
- }
- }
- }
- function Update () {
- if(hit_timer > 0) {
- hit_timer--;
- }
- if(health == 0) {
- Application.LoadLevel(0);
- }
- txt = GameObject.Find("hptxt");
- txt.guiText.text = health.ToString() + " - Attack CD: " + hit_timer;
- checkKeyPress();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement