public Opening_Scene(ContentManager content, WindowWidth windowwidth, int windowheight, Player player, GraphicsDeviceManager graphics) { //Asigns the variables m_content = content; m_windowwidth = windowwidth; m_windowheight = windowheight; m_graphics = graphics; //sets the spawn location player.position = player.GenericSPWN; //Loads the font from the font sheet Font = content.Load <SpriteFont>("Font"); //Textures var texSpeechBox = content.Load <Texture2D>("Textures/TextBox"); var texTextBox = content.Load <Texture2D>("Textures/GENERICTextBox"); var texBackSpace = content.Load <Texture2D>("Textures/BackSpace"); //animations var BloodAnimation = content.Load <Texture2D>("Textures/Blood"); //animated blood anim_Blood = new AnimatedBlood(BloodAnimation); anim_Blood.Position = new Vector2(m_windowwidth.Val - BloodAnimation.Width / 6, 0); //speech box m_SpeechBox = new SpeechBox(); m_SpeechBox.LoadContent(texSpeechBox, new Vector2(m_windowwidth.Val / 2 - texSpeechBox.Width / 2, m_windowheight / 2 - texSpeechBox.Height / 2)); //speech box m_TextBox = new Textbox(); m_TextBox.LoadContent(texTextBox, new Vector2(m_windowwidth.Val / 2 - texTextBox.Width / 2, m_windowheight / 2 - texTextBox.Height / 2)); m_BackSpace = new BackSpace(); m_BackSpace.LoadContent(texBackSpace, new Vector2(0, m_windowheight - texBackSpace.Height)); }
//constructor FOR ROOM6 public Testing_room6(ContentManager Content, WindowWidth windowwidth, int windowheight, Player player) { //Asigns the variables m_content = Content; m_windowwidth = windowwidth; m_windowheight = windowheight; //sets the spawn location player.position = player.GenericSPWN; //Loads the sound file for from the content pipeline Wrong = Content.Load <SoundEffect>("Sound Files/Wrong"); Right = Content.Load <SoundEffect>("Sound Files/Correct"); //Loads the font from the font sheet Arial = Content.Load <SpriteFont>("Font"); //textures m_textBoxes = new List <Textbox>(); var texTextBox = Content.Load <Texture2D>("TextBox"); //textbox left var textbox = new Textbox(); textbox.OnCollision += WrongAnswerCollision; textbox.LoadContent(texTextBox, new Vector2(0, m_windowheight / 2 - texTextBox.Height / 2)); m_textBoxes.Add(textbox); //textbox middle textbox = new Textbox(); textbox.OnCollision += CorrectAnswerCollision; textbox.LoadContent(texTextBox, new Vector2(m_windowwidth.Val / 2 - texTextBox.Width / 2, m_windowheight / 2 - texTextBox.Height / 2)); m_textBoxes.Add(textbox); //textbox right textbox = new Textbox(); textbox.OnCollision += WrongAnswerCollision; textbox.LoadContent(texTextBox, new Vector2(m_windowwidth.Val - texTextBox.Width, m_windowheight / 2 - texTextBox.Height / 2)); m_textBoxes.Add(textbox); //textbox question left textbox = new Textbox(); textbox.LoadContent(texTextBox, new Vector2(m_windowwidth.Val / 2 - texTextBox.Width / 6, m_windowheight / 2 - texTextBox.Height * 2.5f)); m_textBoxes.Add(textbox); //textbox question right textbox = new Textbox(); textbox.LoadContent(texTextBox, new Vector2(m_windowwidth.Val / 2 - texTextBox.Width, m_windowheight / 2 - texTextBox.Height * 2.5f)); m_textBoxes.Add(textbox); //Newspaper m_Newspaper = new Newspaper(Content); m_Newspaper.LoadContent(m_Newspaper.texNewspaper, new Vector2(0, m_windowheight - m_Newspaper.texNewspaper.Height)); //Loads the speech class m_Speech = new MV_Speech(Content, m_windowwidth, m_windowheight); //Chooses which speech to start each level with m_Speech.StartTalking(5); }