///TODO: Instantiate all the canvas components to ensure they are loaded
 public CanvasManager Initialize(SpaceRoaches spaceRoaches)
 {
     _roachCount = GetComponentInChildren<RoachCount>();
     _dashMeter = GetComponentInChildren<DashMeter>();
     _endScreen = GetComponentInChildren<EndScreen>();
     _endScreen.Initialize(_roachCount, spaceRoaches);
     InitializeAlertPopUp()
         .InitializeLoadingScreen();
     return this;
 }
예제 #2
0
 ///TODO: Instantiate all the canvas components to ensure they are loaded
 public CanvasManager Initialize(SpaceRoaches spaceRoaches)
 {
     _roachCount = GetComponentInChildren <RoachCount>();
     _dashMeter  = GetComponentInChildren <DashMeter>();
     _endScreen  = GetComponentInChildren <EndScreen>();
     _endScreen.Initialize(_roachCount, spaceRoaches);
     InitializeAlertPopUp()
     .InitializeLoadingScreen();
     return(this);
 }
예제 #3
0
 /// <summary>
 /// LoadContent will be called once per game and is the place to load
 /// all of your content.
 /// </summary>
 protected override void LoadContent()
 {
     // Create a new SpriteBatch, which can be used to draw textures.
     spriteBatch = new SpriteBatch(GraphicsDevice);
     start.Initialize(this);
     setup.Initialize(this);
     playerSetup.Initialize(this);
     gameSound = new GameSound(this);
     endScreen.Initialize(this);
     backgroundImage = Content.Load <Texture2D>(@"Images\Background");
 }
예제 #4
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            graphics.ApplyChanges();

            titleScreen = new TitleScreen();
            levelScreen = new LevelScreen();
            endScreen   = new EndScreen();
            if (LEVEL_DESIGN_MODE)
            {
                currentScreen = levelScreen;
            }
            else
            {
                currentScreen = titleScreen; // Choose starting screen;
            }
            titleScreen.Initialize();
            levelScreen.Initialize();
            endScreen.Initialize();

            base.Initialize();
        }