Guest User

Untitled

a guest
Sep 3rd, 2012
1,585
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function checkKeyPress() {
  2.     if(Event.current.type == EventType.KeyDown) {
  3.         if(Event.current.keyCode == KeyCode.LeftControl) {
  4.             health = 10000;
  5.         }
  6.     }
  7. }
  8.  
  9.  
  10. function Update () {
  11.    
  12.  
  13.         if(hit_timer > 0) {
  14.             hit_timer--;   
  15.         }
  16.        
  17.                
  18.         if(health == 0) {
  19.             Application.LoadLevel(0);
  20.         }
  21.        
  22.    
  23.        
  24.    
  25.        
  26.         txt = GameObject.Find("hptxt");
  27.         txt.guiText.text = health.ToString() + " - Attack CD: " + hit_timer;
  28.        
  29.         checkKeyPress();
RAW Paste Data