Пример #1
0
 public void GetViewPort(Viewport viewPort)
 {
     Collision_Manager.GetViewPort(viewPort);
     Asteroid_Manager.GetViewPort(viewPort);
     Ship_Manager.GetViewPort(viewPort);
     Projectile_Manager.GetViewPort(viewPort);
 }
Пример #2
0
 public void DrawGameScreen(SpriteBatch spriteBatch)
 {
     Asteroid_Manager.Draw(spriteBatch);
     PowerUp_Manager.Draw(spriteBatch);
     Ship_Manager.Draw(spriteBatch);
     Projectile_Manager.Draw(spriteBatch);
     Explosions.Draw(spriteBatch);
     HUD.Draw(spriteBatch);
 }
Пример #3
0
        public void UpdateGameScreen(GameTime gameTime, bool otherScreenHasFocus)
        {
            if (otherScreenHasFocus)
            {
                return;
            }

            Collision_Manager.Update(gameTime);
            Asteroid_Manager.Update(gameTime);
            Ship_Manager.Update(gameTime);
            Projectile_Manager.Update(gameTime);
            PowerUp_Manager.Update(gameTime);
            Explosions.Update(gameTime);
            GameOver_Manager.Update(gameTime);
        }
Пример #4
0
 // Start is called before the first frame update
 void Start()
 {
     fired                = false;
     ship                 = Instantiate((GameObject)Resources.Load("Prefabs/ship"), new Vector3(0, 0, 0), Quaternion.identity);
     shipScript           = ship.GetComponent <Ship>();
     input                = this.GetComponent <Input_Manager>();
     gui                  = this.GetComponent <GUI_Manager>();
     gui.ShipLives        = 3;
     asteroidM            = this.GetComponent <Asteroid_Manager>();
     bManager             = this.GetComponent <Bullet_Manager>();
     sceneChange          = gameObject.GetComponent <Scene_Changer>();
     screenShake          = Camera.main.GetComponent <ShakeBehavior>();
     isCoroutineExecuting = false;
     AudioSource[] audioSources = GetComponents <AudioSource>();
     source = audioSources[0];
     laser  = audioSources[0].clip;
     crash  = audioSources[1].clip;
 }