Quantcast
Channel: Latest Questions by Crispinator
Viewing all articles
Browse latest Browse all 30

Scoring System

$
0
0
I have been looking at this script for hours and have gotten nowhere. I have two scripts. One manages the score ad is on the gameManager. The second is on the enemy. I cannot figure out what is wrong. **Score Script** #pragma strict var curPoints : int; function Start () { } function ApplyPoints (curPoints : int) { Debug.Log(curPoints); GameObject.Find("Scoregui").guiText.text = ""+ curPoints; } **Enemy Script** #pragma strict var gameManager : GameObject; function OnCollisionEnter (collision : Collision) { gameManager.GetComponent("Score"); Component("Score").SendMessage("ApplyPoints", 10); Destroy(gameObject); }

Viewing all articles
Browse latest Browse all 30

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>