Guest User

Untitled

a guest
Jul 21st, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. var piste = 0;
  2.  
  3. var pisteT : GUIText;
  4.  
  5.  
  6.  
  7. function OnCollisionEnter(theCollision : Collision){
  8.  
  9. if(theCollision.GameObject.Find("target").name == "trigger"){
  10.  
  11. piste = piste + 15;
  12.  
  13. }else if(theCollision.gameObject.name == "Wall"){
  14.  
  15. Debug.Log("Hit the wall");
  16.  
  17. }}
  18.  
  19.  
  20.  
  21. function Update () {
  22.  
  23. guiText.text = "Pisteesi:" +piste;
  24.  
  25. }
Add Comment
Please, Sign In to add comment