예제 #1
0
        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;
            }
        }
예제 #2
0
 // Use this for initialization
 void Start()
 {
     ballSpawnerScript = ballSpawner.GetComponent<BallSpawnerScript>();
 }
예제 #3
0
 // Use this for initialization
 void Start()
 {
     instance = this;
     ballSpawnerScript = ballSpawner.GetComponent<BallSpawnerScript>();
 }
예제 #4
0
 private void Awake()
 {
     Instance = this;
 }
예제 #5
0
 void Start()
 {
     ballSpawnerScript = GameObject.Find("Ball Spawner").GetComponent <BallSpawnerScript> ();
     audioSource       = GetComponent <AudioSource> ();
 }