Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var piste = 0;
- var pisteT : GUIText;
- function OnCollisionEnter(theCollision : Collision){
- if(theCollision.GameObject.Find("target").name == "trigger"){
- piste = piste + 15;
- }else if(theCollision.gameObject.name == "Wall"){
- Debug.Log("Hit the wall");
- }}
- function Update () {
- guiText.text = "Pisteesi:" +piste;
- }
Add Comment
Please, Sign In to add comment