Hey all!
I'm currently working on an arcade style game where you fire spheres at targets to gain points. Something is not quite right with part of my code, though. Whenever the player character fires at another object, the score resets instead of adding onto itself.
I'm still pretty bad with programming and sort of threw this together with help from a friend:
____
import UnityEngine.UI;
var ScoreManager : Text;
var score : int = 0;
function OnCollisionEnter (col : Collision){
if(col.gameObject.tag == "Bullet"); {
score += 0;
ScoreManager.text = score.ToString();
_____
What exactly am I missing? Thank you for your time!
↧