//Constructor public TitleScreen(Texture2D logo, Texture2D options, Texture2D arrow) { this.z_logo = logo; this.z_options = options; this.z_arrow = new GameObject(arrow); //Try to fiqure the starting position for arrow ^^ this.z_arrow.setPosition(new Vector2(170, 350)); this.z_currentState = TitleState.Start; }
public void setArrow(GameObject newArrow) { this.z_arrow = newArrow; }
//Load Content Method ----------------------------------------------------------------------------------- protected override void LoadContent() { //Set the contentManger this.z_contentManager = new ContentManager(Services); // Create a new SpriteBatch, which can be used to draw textures. this.z_spriteBatch = new SpriteBatch(GraphicsDevice); //Set the viewPortRec this.z_viewportRec = new Rectangle(0, 0, z_graphics.GraphicsDevice.Viewport.Width, z_graphics.GraphicsDevice.Viewport.Height); //Load the background Images this.z_backgroundImage1 = new ScrollingBackground(Content.Load<Texture2D>("Textures\\spaceBackground")); this.z_backgroundImage2 = new ScrollingBackground(Content.Load<Texture2D>("Textures\\spaceBackground")); //Set the positions for the background Images this.z_backgroundImage1.setPosition(new Vector2(0f, 0f)); this.z_backgroundImage2.setPosition(new Vector2(0f, 0f - this.z_viewportRec.Height)); //Turn the background Images alive this.z_backgroundImage1.setIsAlive(true); this.z_backgroundImage2.setIsAlive(true); //Create the Player's ship image this.z_playerShip = new PlayerShip(Content.Load<Texture2D>("Images\\ship2")); //Set the starting position for player's ship this.z_playerShip.setPosition(new Vector2(this.z_viewportRec.Center.X, z_graphics.GraphicsDevice.Viewport.Height - 80)); //Set the player alive this.z_playerShip.setIsAlive(true); //Load the Music this.z_beautifulDarkness = Content.Load<Song>("Audio\\Beautiful_Darkness"); MediaPlayer.IsRepeating = true; //Load Fonts this.z_timerFont = Content.Load<SpriteFont>("Fonts\\TimerFont"); //Load Achivement Stuff this.z_achivementFail = new GameObject(Content.Load<Texture2D>("Images\\AchivementFailed")); this.z_achivementFail.setPosition(new Vector2((this.z_viewportRec.Width/2)-(this.z_achivementFail.getSprite().Width/2), this.z_viewportRec.Height-100)); this.z_achivementSound = Content.Load<SoundEffect>("Audio\\AchievementSound"); //Load the Settings for the asteroidManager this.z_asteroidManager = new AsteroidManager(AsteroidManager.AsteroidManagerState.Moderate, this.z_viewportRec, this.z_contentManager, this.z_spriteBatch); }