|
I'm making a game where by clicking the moving target your gain points. I've got in figured out a little but the code isn't responding. What am I missing? What code will help me have the score total appear on screen? I've looked all over and other scripts have not work for my application. Moving object Script:
(comments are locked)
|
|
This code only sets the score text to buck when you press the left mouse button over the object to which the script is attached.
var buck : int = 1;
var ScoreBoard : GUIText; // <- drag your GUIText here
function OnMouseOver () {
if (Input.GetMouseButtonDown(0)){
buck += 1;
ScoreBoard.text = ("Score: ") + buck;
}
}
The scoreboard will initiate from value zero, can you tell that how to carry the sore of first level to next level so that the new score should be added into it.
Dec 12 '12 at 05:37 PM
himanshu619
(comments are locked)
|
