Quantcast
Channel: AR/VR (XR) Discussion
Viewing all articles
Browse latest Browse all 12131

How to create a VR Health Bar?

$
0
0
as the title, someone please help me ?

My Health Script :

Code (JavaScript):
  1. #pragma strict
  2.  
  3. var Health = 100;
  4.  
  5. function ApplyDammage (TheDammage : int)
  6. {
  7.     Health -= TheDammage;
  8.    
  9.     if(Health <= 0)
  10.     {
  11.         Dead();
  12.     }
  13. }
  14.  
  15. function Dead()
  16. {
  17.     Destroy (gameObject);
  18. }

Viewing all articles
Browse latest Browse all 12131

Trending Articles