Hey everyone I am having trouble getting the proper script in place that I can add to my game where I can put in what score is needed to reach the next level and put what level to change to it is by having variables.
I attached my script and i cant get it to work.
Score is the set to public and what my total score is. I believe this is correct.
I am trying to add levels to the Survival Shooter Tutorial game if that helps as well.
Would I make a new script with this and add to the level or would I add this to my score manager script which is here.
How I thought it would work is on each scene would have the script added with Variable Values so that I can progress through levels.
Sorry I am really new at this thanks
This is the ScoreManager that I did in the tutorial.
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
namespace CompleteProject
{
public class ScoreManager : MonoBehaviour
{
public static int score; // The player's score.
Text text; // Reference to the Text component.
void Awake ()
{
// Set up the reference.
text = GetComponent <Text> ();
// Reset the score.
score = 0;
}
void Update ()
{
// Set the displayed text to be the word "Score" followed by the score value.
text.text = "Score: " + score;
}
}
}