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;
            }
        }
Example #2
0
 // 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;
 }
Example #5
0
 void Start()
 {
     ballSpawnerScript = GameObject.Find("Ball Spawner").GetComponent <BallSpawnerScript> ();
     audioSource       = GetComponent <AudioSource> ();
 }