private void Awake() { Player1Stats.Health = 3; Player2Stats.Health = 3; BSS = FindObjectOfType <BallSpawnerScript>(); UltimatePinballData Data = SaveManager.LoadUltimatePinball(); Game_Type = (GameTypes)Data.LastGameTypeSelected; switch (Game_Type) { case GameTypes.Lives: Player1Stats.Health = Data.LastGameTypeAmountSelected; Player2Stats.Health = Data.LastGameTypeAmountSelected; break; case GameTypes.Timer: TimeLimit = Data.LastGameTypeAmountSelected; Timer = TimeLimit; break; case GameTypes.SetScore: TargetScore = Data.LastGameTypeAmountSelected; break; default: break; } }
// Use this for initialization void Start() { ballSpawnerScript = ballSpawner.GetComponent<BallSpawnerScript>(); }
// Use this for initialization void Start() { instance = this; ballSpawnerScript = ballSpawner.GetComponent<BallSpawnerScript>(); }
private void Awake() { Instance = this; }
void Start() { ballSpawnerScript = GameObject.Find("Ball Spawner").GetComponent <BallSpawnerScript> (); audioSource = GetComponent <AudioSource> (); }