Advertisement
Guest User

Invincibility Power Script

a guest
Oct 14th, 2013
8,639
-1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 1
  1. public bool invincible;
  2. public Material solid;
  3. public Material faded;
  4. public float duration;
  5.  
  6. // Use this for initialization
  7. void Start ()
  8. {
  9. renderer.material = solid;
  10. }
  11.  
  12. // Update is called once per frame
  13. void Update ()
  14. {
  15. Debug.Log(counter);
  16.  
  17. invincible = false;
  18.  
  19. if(Input.GetKey(KeyCode.X))
  20. {
  21. invincible = true;
  22. renderer.material = faded;
  23. }
  24. else
  25. {
  26. gameObject.renderer.material = solid;
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement