Ejemplo n.º 1
0
 private void Init()
 {
     spawner   = EnemySpawner.Get();
     highScore = PlayerPrefs.GetInt("HighScore");
     UIManager = UIGameplayManager.Get();
     UIManager.RefreshScoreUI();
 }
Ejemplo n.º 2
0
 void FixedUpdate()
 {
     if (Input.GetButton("Fire1") && Time.time >= nextTimeToFire && !UIGameplayManager.Get().gameOver)
     {
         nextTimeToFire = Time.time + 1f / fireRate;
         Shoot();
     }
 }
Ejemplo n.º 3
0
 private void Awake()
 {
     if (Instance != null)
     {
         Debug.Log("[UIGameplayManager] There is more then one player Instance");
         return;
     }
     Instance = this;
 }
Ejemplo n.º 4
0
 void Update()
 {
     if (Limiter.Get().playerIsOutsideTheLimit)
     {
         explosion.Play();
         Limiter.Get().playerIsOutsideTheLimit = false;
         AeroplaneUserControl2Axis.playerIsAlive = false;
         gameOver.SetActive(true);
         Cursor.lockState = CursorLockMode.None;
         Cursor.visible   = true;
         UIGameplayManager.Get().gameOver = true;
     }
 }
Ejemplo n.º 5
0
 private void Start()
 {
     player    = Player.Get();
     ugManager = UIGameplayManager.Get();
 }