public DeadScreen(Game1 eng) : base(eng) { buttons.Add(respawn = new StartScreenButton(eng.GraphicsDevice.Viewport.Width / 2 + 160, 300, "respawn", "respawnHover", "reload", eng)); buttons.Add(startover = new StartScreenButton(eng.GraphicsDevice.Viewport.Width / 2 + 160, 350, "startover", "startoverHover", "startscreen", eng)); buttons.Add(exit = new StartScreenButton(eng.GraphicsDevice.Viewport.Width / 2 + 160, 400, "exitDead", "exitDeadHover", "exit", eng)); }
public PauseScreen(Game1 eng) : base(eng) { engine = eng; buttons.Add(new StartScreenButton(290, 280, "title","titleHover", "startscreen",eng)); buttons.Add(new StartScreenButton(290, 380, "help","helpHover", "help",eng)); }
public StartScreen(Game1 eng) : base(eng) { buttons.Add(start = new StartScreenButton(eng.GraphicsDevice.Viewport.Width / 2 + 160, 300, "start", "startHover", "play", eng)); buttons.Add(continueB = new StartScreenButton(eng.GraphicsDevice.Viewport.Width / 2 + 160, 350, "continue", "continueHover", "continue", eng)); buttons.Add(exit = new StartScreenButton(eng.GraphicsDevice.Viewport.Width / 2 + 160, 400, "exit", "exitHover", "exit", eng)); }
public Player(int xLocation, int yLocation, Inventory i, Game1 eng) : base(xLocation, yLocation) { animations.Add("idleDown", new int[] { 0, 2 }); animations.Add("idleUp", new int[] { 1, 2 }); animations.Add("idleRight", new int[] { 2, 2 }); animations.Add("idleLeft", new int[] { 3, 2 }); animations.Add("moveDown", new int[] { 4, 4 }); animations.Add("moveUp", new int[] { 5, 4 }); animations.Add("moveRight", new int[] { 6, 2 }); animations.Add("moveLeft", new int[] { 7, 2 }); goodGraphic = Textures.textures["protagsheet"]; badGraphic = Textures.textures["protagsheet"]; row = 7; imageBoundingRectangle = new Rectangle(32 * row, 32, 32, 32); width = 32; height = 32; velocity = 4; collidable = false; inventory = i; engine = eng; proportion = 0.5; hitByLaser = 10; dirtTracks = false; }
public Inventory(Game1 eng) { items = new InventoryItem[2,7]; initializeItemRectangles(); inventoryGraphic = Textures.textures["inventory2"]; sf = Textures.fonts["arial12"]; engine = eng; }
public PlatformScreen(Game1 eng) : base(eng) { string[] temp = { "You can attempt to drop an item onto a platform by dragging it out of your inventory while standing on the platform.", "Use the I key to toggle the inventory on and off."}; instructions = temp; currentInfoText = adjustTextForWrap(instructions[infoIndex], Textures.fonts["arial12"]); numInfoBlocks = 2; }
public InventoryScreen(Game1 eng) : base(eng) { string[] temp = { "Congratulations, you have found an item! All items are stored in your inventory at the top right. You can press the I key to toggle it on and off.", "Hover over your items to learn something about them.", "Maybe you can even combine them to make something better!" }; instructions = temp; currentInfoText = adjustTextForWrap(instructions[infoIndex], Textures.fonts["arial12"]); numInfoBlocks = 3; }
public KnifeExpositionScreen(Game1 eng) : base(eng) { string[] temp = { "October 9, 2003...", "Dear Diary...", "My dad shoved me into the wall today after I told my mom I hated her and that she doesn't get me.", "He shouldn't have done that.", "He's going to tell me he's sorry...", "I stole this knife from the art room at school today. No one will know it's missing." }; instructions = temp; currentInfoText = adjustTextForWrap(instructions[infoIndex], Textures.fonts["arial12"]); numInfoBlocks = 6; }
public OpeningExpositionScreen(Game1 eng) : base(eng) { string[] temp = { "What... what have I done...", "No... This can't be real, I'm not this kind of person", "I'm so sorry... I'm so sorry...", "Nothing makes sense anymore... nothing...", "Nothi... Zzzzz.... zzzz...", "zzzz....zzzzz....." }; instructions = temp; currentInfoText = adjustTextForWrap(instructions[infoIndex], Textures.fonts["arial12"]); numInfoBlocks = 6; }
public RoseExpositionScreen(Game1 eng) : base(eng) { string[] temp = { "Mom....... ?", "Dad.......?", "I take it back...", "Please come back...", "PLEASE............", "I miss you....", ".........", "This rose......", "It's beautiful.....", "Life is beautiful...", "I love you mom and dad.... I'm so sorry..." }; instructions = temp; currentInfoText = adjustTextForWrap(instructions[infoIndex], Textures.fonts["arial12"]); numInfoBlocks = 11; }
public ShiftLockScreen(Game1 eng) : base(eng) { string[] temp = { "The tile you have just stepped on has locked your ability to Shift! Notice the lock symbol on your Shift cooldown bar to the upper left.","Find a key tile to unlock it, so you may Shift once again!"}; instructions = temp; currentInfoText = adjustTextForWrap(instructions[infoIndex], Textures.fonts["arial12"]); numInfoBlocks = 2; }
public DiaryExpositionScreen(Game1 eng) : base(eng) { textBoxLocation = new Point(150, 100); string[] temp = { "My diary...", "September 23, 2003 ...", "Dear Diary, ...", "Today mom told me I had to go to that stupid therapy meeting after school again. If I have to talk to Dr. Boring one more time I'm going to blow my brains out... Or moms brain...", "And dad said if he catches me smoking one more time he won't buy me a car. Are all parents this lame? I want them gone. I hate them." }; instructions = temp; currentInfoText = adjustTextForWrap(instructions[infoIndex], Textures.fonts["arial12"]); numInfoBlocks = 5; }
public StartScreenButton(int xLoc, int yLoc, string gra1, string gra2, string actionin, Game1 eng) { graphic = Textures.textures[gra1]; graphicHover = Textures.textures[gra2]; x = xLoc; y = yLoc; action = actionin; imageBoundingRectangle = new Rectangle(0, 0, graphic.Width, graphic.Height); clickBox = new Rectangle(x, y, graphic.Width, graphic.Height); beep = Textures.sounds["beep"]; engine = eng; }
public TextBoxScreen(Game1 eng) : base(eng) { textBox = Textures.textures["textBox"]; textBoxLocation = new Point(150, 100); leftButtonLocation = new Point(padding + textBoxLocation.X, textBoxLocation.Y + textBox.Height - (Textures.textures["leftArrow"].Height + padding)); rightButtonLocation = new Point(textBoxLocation.X + textBox.Width - (Textures.textures["leftArrow"].Width + padding), textBoxLocation.Y + textBox.Height - (Textures.textures["leftArrow"].Height + padding)); exitButtonLocation = new Point(textBoxLocation.X + textBox.Width - (Textures.textures["xButton"].Width + padding), padding + textBoxLocation.Y); pageQuotientLocation = new Point(textBoxLocation.X + textBox.Width/2,rightButtonLocation.Y); buttons.Add(new TextBoxLeftButton(leftButtonLocation.X, leftButtonLocation.Y, "leftArrow", "leftArrowHovered", this)); buttons.Add(new TextBoxRightButton(rightButtonLocation.X, rightButtonLocation.Y, "rightArrow", "rightArrowHovered", this)); buttons.Add(new TextBoxExitButton(exitButtonLocation.X, exitButtonLocation.Y, "xButton", "xButtonHovered", this)); }
public Player(int xLocation, int yLocation, bool initialState, Inventory i, Game1 eng) : base(xLocation, yLocation, initialState) { goodGraphic = Textures.textures["sprites"]; badGraphic = Textures.textures["sprites"]; row = 7; imageBoundingRectangle = new Rectangle(32 * row, 32, 32, 32); width = 32; height = 32; velocity = 4; collidable = false; inventory = i; engine = eng; }
public AboutScreen(Game1 eng) : base(eng) { int xCtr = 32, yCtr = 64; foreach(string s in buttonInfo) { string[]fields = s.Split('|'); ObjectButton b = new ObjectButton(xCtr, yCtr, fields[1], fields[2], fields[3], fields[4]); stringToButton.Add(fields[0], b); buttons.Add(b); xCtr += 64; if(xCtr >= 448) { xCtr = 32; yCtr += 64; } } }
public DanceScreen(Game1 eng, Player p) { engine = eng; screenWidth = engine.getScreenWidth(); screenHeight = engine.getScreenWidth(); if(screenWidth < 800) { screenWidth = 800; } tiles = new Tile[screenWidth / 32, screenHeight / 32]; for (int x = 0; x < tiles.GetLength(0); x++ ) { for(int y = 0; y < tiles.GetLength(1); y++ ) { int temp = rand.Next(3); tiles[x,y] = new Tile(temp,x,y); } } makePoints(); addPointOffset(); player = p; }
public InventoryScreen(Game1 eng) : base(eng) { buttons.Add(new InventoryScreenButton(eng.GraphicsDevice.Viewport.Width / 2 + 160, 300, "start", "startHover", this)); }
static void Main() { using (var game = new Game1()) game.Run(); }
public Screen(Game1 eng) { engine = eng; }