public ItemTile(int key, Rectangle newBox, String imgLoc, Game1 game) : base(game) { this.itemKey = key; this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(imgLoc)); this.Box = newBox; }
public PromptTile(int key, Rectangle newBox, Game1 game) : base(game) { this.active = false; this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/GUIImages/Mprompt.png")); this.Box = newBox; }
public DownBot(int key, Rectangle newBox, Game1 game) : base(game) { this.active = true; this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/GeneralTileImages/DownBot.png")); this.Box = newBox; }
public HealthBarTile(int key, Rectangle newBox, Game1 game) : base(game) { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/GeneralTileImages/DownTop.png")); this.pixelShow = this.image.Width; this.Box = newBox; }
public ResourceTiles(int key, Rectangle newBox, Game1 game) : base(game) { this.active = true; this.itemKey = key; switch (key) { case 0: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/ResourceImages/BurstBar_01.png")); break; } case 1: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/ResourceImages/BurstBar_02.png")); break; } case 2: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/ResourceImages/BurstBar_03.png")); break; } } this.Box = newBox; }
public ResourceTiles(int key, Rectangle newBox, Game1 game) : base(game) { this.active = true; this.itemKey = key; this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/ResourceImages/BurstBar.png")); this.Box = newBox; }
public InfoTile(int key, Rectangle newBox, Game1 game) : base(game) { this.active = true; this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/GUIImages/InfoButton.png")); this.pixelShow = this.image.Width; this.Box = newBox; }
public InventoryDisplayTileItem(int key, Rectangle newBox, Game1 game) : base(game) { this.active = true; this.itemKey = key; this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/GeneralTileImages/SlipperyTile.png")); this.Box = newBox; }
public PlayerSpriteClass(Texture2D texture, int row, int col, int ACTIVELVL, Vector2 initLocs, Game1 game) { Texture = texture; Row = row; Col = col; currFrame = 0; totalFrames = Row * Col; this.aCTIVELVL = ACTIVELVL; this.playerLocation = initLocs; sPrompt = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/GUIImages/Sprompt.png")); }
public ScoreTiles(int key, Rectangle newBox,Game1 game) : base(game) { this.active = true; this.itemKey = key; switch(key) { case 1: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/ScoreTileImages/HealthGreen_01.png")); break; } case 2: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/ScoreTileImages/HealthGreen_02.png")); break; } case 3: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/ScoreTileImages/HealthGreen_03.png")); break; } case 4: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/ScoreTileImages/HealthGreen_05.png")); break; } case 5: { this.depleted = true; this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/ScoreTileImages/HealthRed_01.png")); break; } case 6: { this.depleted = true; this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/ScoreTileImages/HealthRed_02.png")); break; } case 7: { this.depleted = true; this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/ScoreTileImages/HealthRed_03.png")); break; } case 8: { this.depleted = true; this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/ScoreTileImages/HealthRed_05.png")); break; } } this.Box = newBox; }
public OhmDropTile(int key,Rectangle newBox, Game1 game) : base(game) { this.box = newBox; this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/MiniGameTileImages/OhmDropTile.png")); switch (key) { case 1: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/MiniGameTileImages/OhmDropTile.png")); wirePosition = 1; this.colour = 1; break; } case 2: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/MiniGameTileImages/OhmDropTile.png")); wirePosition = 2; this.colour = 1; break; } case 3: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/MiniGameTileImages/OhmDropTile.png")); wirePosition = 1; this.colour = 2; break; } case 4: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/MiniGameTileImages/OhmDropTile.png")); wirePosition = 2; this.colour = 2; break; } case 5: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/MiniGameTileImages/OhmDropTile.png")); wirePosition = 1; this.colour = 3; break; } case 6: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/MiniGameTileImages/OhmDropTile.png")); wirePosition = 2; this.colour = 3; break; } } }
public CraneTile(int key, Rectangle newBox, Game1 game) : base(game) { switch(key) { case 1: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images//LVL2Resources/CraneFiller_01.png")); break; } case 2: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images//LVL2Resources/CraneFiller_02.png")); break; } case 3: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images//LVL2Resources/CraneFiller_03.png")); break; } case 4: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images//LVL2Resources/CraneFiller_04.png")); break; } case 5: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images//LVL2Resources/CraneFiller_05.png")); break; } case 6: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images//LVL2Resources/CraneFiller_06.png")); break; } case 7: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images//LVL2Resources/CraneFiller_07.png")); break; } case 8: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images//LVL2Resources/CraneFiller_08.png")); break; } } this.Box = newBox; }
public BackGroundTile(int key, Rectangle newBox, Game1 game) : base(game) { switch(key) { case -3: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/GeneralTileImages/WireYellow.png")); break; } case -2: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/GeneralTileImages/WireRed.png")); break; } case -1: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/GeneralTileImages/WireGreen.png")); break; } case 0: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/GeneralTileImages/BGTile.png")); break; } case 1: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/GeneralTileImages/FillerBackground.png")); break; } case 2: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/ResourceImages/BurstBarUnderlay.png")); break; } } this.Box = newBox; }
public SpikeTile(int key, Rectangle newBox, Game1 game) : base(game) { switch (key) { case 1: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/GeneralTileImages/SpikeTileUp.png")); break; } case 2: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/GeneralTileImages/SpikeTileLeft.png")); break; } case 3: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/GeneralTileImages/SpikeTileRight.png")); break; } } this.Box = newBox; }
public WireTile(int key, Rectangle newBox, Game1 game) : base(game) { switch (key) { case 1: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/MiniGameTileImages/WireGreen.png")); break; } case 2: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/MiniGameTileImages/WireRed.png")); break; } case 3: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/MiniGameTileImages/WireYellow.png")); break; } } this.Box = newBox; }
public StatusTile(int key, Rectangle newBox, Game1 game) : base(game) { switch(key) { case 1: { wireColor = 1; break; } case 2: { wireColor = 2; break; } case 3: { wireColor = 3; break; } } this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/MiniGameTileImages/X.png")); this.Box = newBox; }
public PromptTile(int key, Rectangle newBox, Game1 game) : base(game) { this.pKey = key; this.active = false; this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/GUIImages/Mprompt.png")); this.Box = newBox; switch(key) { case 1: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/GUIImages/Mprompt.png")); active = true; dispProp = 1; break; } case 2: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/GUIImages/Sprompt.png")); dispProp = 1; break; } } }
public PlayerTile(int key, Rectangle newBox, Game1 game, Texture2D pImage) : base(game) { this.active = true; switch(key) { case 1: { this.image = pImage; break; } case 2: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/PlayerImages/EngineerSpriteSheet.png")); break; } case 3: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/PlayerImages/MinerSpriteSheet.png")); break; } } this.Box = newBox; }
public LadderTile(int key, Rectangle newBox, Game1 game) : base(game) { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/GeneralTileImages/Ladder.png")); this.Box = newBox; }
public GridLayout(Game1 gameObj) { this.gameObj = gameObj; }
public OhmTile(int key, Rectangle newBox, Game1 game, int retX, int retY) : base(game) { switch (key) { //Green Resistors case 1: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/GeneralTileImages/Resistor.png")); this.placed = false; this.ohmVal = 15.000; this.colour = 1; returnState = new Point(retX, retY); break; } case 2: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/GeneralTileImages/Resistor.png")); this.placed = false; this.ohmVal = 150.000; this.colour = 1; returnState = new Point(retX, retY); break; } case 3: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/GeneralTileImages/Resistor.png")); this.placed = false; this.ohmVal = 1500.000; this.colour = 1; returnState = new Point(retX, retY); break; } case -3: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/GeneralTileImages/Resistor.png")); this.placed = false; this.ohmVal = 2.200; this.colour = 1; returnState = new Point(retX, retY); break; } //Red Resistors case 4: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/GeneralTileImages/Resistor.png")); this.placed = false; this.ohmVal = 2.2000; this.colour = 2; returnState = new Point(retX, retY); break; } case 5: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/GeneralTileImages/Resistor.png")); this.placed = false; this.ohmVal = 120.000; this.Colour = 2; returnState = new Point(retX, retY); break; } case 6: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/GeneralTileImages/Resistor.png")); this.placed = false; this.ohmVal = 240.000; this.Colour = 2; returnState = new Point(retX, retY); break; } case 7: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/GeneralTileImages/Resistor.png")); this.placed = false; this.ohmVal = 1500.000; this.Colour = 2; returnState = new Point(retX, retY); break; } //Yellow Resistors case 8: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/GeneralTileImages/Resistor.png")); this.placed = false; this.ohmVal = 2.2000; this.Colour = 3; returnState = new Point(retX, retY); break; } case 9: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/GeneralTileImages/Resistor.png")); this.placed = false; this.ohmVal = 47.000; this.Colour = 3; returnState = new Point(retX, retY); break; } case 10: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/GeneralTileImages/Resistor.png")); this.placed = false; this.ohmVal = 270.000; this.Colour = 3; returnState = new Point(retX, retY); break; } case 11: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/GeneralTileImages/Resistor.png")); this.placed = false; this.ohmVal = 470.000; this.Colour = 3; returnState = new Point(retX, retY); break; } } this.Box = newBox; }
//TODO Determine all parameters needed to spawn a physics class with functionality. public Physics(Game1 gameObj, int characterNum, SpriteBatch sprites, GraphicsDeviceManager graphics) { characterFacing = CharDirection.Right; activePlayer = ActivePlayerz.Miner; ACTIVELEVEL = 1; this.gameObj = gameObj; this.characterNum = characterNum; this.sprites = sprites; this.graphics = graphics; eventStates = new bool[5]; healthRemaining = 200; pathHighlight = Texture2D.FromStream(gameObj.GraphicsDevice, TitleContainer.OpenStream(@"Images/GUIImages/Path.png")); resList = new List<double>(); resList.Add(0.0); resList.Add(0.0); resList.Add(0.0); }
public SplitSpikeTile(int key, Rectangle newBox, Game1 game) : base(game) { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/MiniGameCaveEventTileImages/SplitSpikeTile.png")); this.Box = newBox; }
public Tile(Game1 game) { this.game = game; }
public InventoryDisplayTileItem(int key, Rectangle newBox, Game1 game) : base(game) {
public MapContainer(Game1 game) { gd = game.GraphicsDevice; gdm = game.graphicsFunc; item1 = "Images/ItemImages/MiningAxe.png"; item2 = "Images/ItemImages/FlashLight.png"; item3 = "Images/ItemImages/Battery.png"; item4 = "Images/ItemImages/MedKitTile.png"; item5 = "Images/ItemImages/EngineerToolKit.png"; }
public MapContainer(Game1 game) { gd = game.GraphicsDevice; gdm = game.graphicsFunc; item1 = "Images/ItemImages/MiningAxe.png"; item2 = "Images/ItemImages/MiningAxe.png"; item3 = "Images/ItemImages/MiningAxe.png"; item4 = "Images/ItemImages/MedKitTile.png"; item5 = "Images/ItemImages/MiningAxe.png"; }
public OhmTile(int key, Rectangle newBox, Game1 game) : base(game) { switch (key) { //Green Resistors case 1: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/MiniGameTileImages/15OhmGreen.png")); this.placed = false; this.ohmVal = 15.0; this.colour = 1; break; } case 2: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/MiniGameTileImages/150OhmGreen.png")); this.placed = false; this.ohmVal = 150.0; this.colour = 1; break; } case 3: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/MiniGameTileImages/1500OhmGreen.png")); this.placed = false; this.ohmVal = 1500.0; this.colour = 1; break; } case -3: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/MiniGameTileImages/2.2OhmGreen.png")); this.placed = false; this.ohmVal = 2.2; this.colour = 1; break; } //Red Resistors case 4: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/MiniGameTileImages/2.2OhmRed.png")); this.placed = false; this.ohmVal = 2.20; this.colour = 2; break; } case 5: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/MiniGameTileImages/120OhmRed.png")); this.placed = false; this.ohmVal = 120.0; this.Colour = 2; break; } case 6: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/MiniGameTileImages/240OhmRed.png")); this.placed = false; this.ohmVal = 240.0; this.Colour = 2; break; } case 7: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/MiniGameTileImages/1500OhmRed.png")); this.placed = false; this.ohmVal = 1500.0; this.Colour = 2; break; } //Yellow Resistors case 8: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/MiniGameTileImages/2.2OhmYellow.png")); this.placed = false; this.ohmVal = 2.20; this.Colour = 3; break; } case 9: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/MiniGameTileImages/47OhmYellow.png")); this.placed = false; this.ohmVal = 47.0; this.Colour = 3; break; } case 10: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/MiniGameTileImages/270OhmYellow.png")); this.placed = false; this.ohmVal = 270.0; this.Colour = 3; break; } case 11: { this.image = Texture2D.FromStream(game.GraphicsDevice, TitleContainer.OpenStream(@"Images/MiniGameTileImages/470OhmYellow.png")); this.placed = false; this.ohmVal = 470.0; this.Colour = 3; break; } } this.Box = newBox; }
public DownBot(int key, Rectangle newBox, Game1 game) : base(game) {
static void Main() { using (var game = new Game1()) game.Run(); }