This is the script that does not work: (I am sorry that I have so many questions but I keep coming into issues. Thankfully they have an easy fix.)
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class ScoreManager : MonoBehaviour {
public static int score;
Text text;
void start()
{
text = GetComponent<Text> ();
score = 0;
}
void Update()
{
if (score < 0)
score = 0;
text.text = "" + score;
}
public static void AddPoints (int pointsToAdd)
{
score += pointsToAdd;
}
public static void Reset()
{
score = 0;
}
}
a. what is the problem
b. how do I fix it?