public static void Update(GameTime gameTime, Rectangle clientBounds) { if (Jon != null) { Jon.Update(gameTime, clientBounds, 0); Jon.currentFrame.Y = 0; if (Jon.npc.Intersects(Lvl1.scott.scottr)) { Battle1.npc_hp = 100; Battle1.npc_def = 20; Battle1.npc_att = 20; Jon = null; Game1.screen_selector = 8; } } Functions.collision(new Rectangle(-294+Lvl1.backx,6,44,593),Lvl1.scott.scottr,Lvl1.scott.speed,Lvl1.collision); Functions.collision(new Rectangle(-250 + Lvl1.backx, 44, 1002, 57), Lvl1.scott.scottr, Lvl1.scott.speed, Lvl1.collision); Functions.collision(new Rectangle(752 + Lvl1.backx, 46, 43, 553), Lvl1.scott.scottr, Lvl1.scott.speed, Lvl1.collision); Functions.collision(new Rectangle(400 + Lvl1.backx, 148, 262, 102), Lvl1.scott.scottr, Lvl1.scott.speed, Lvl1.collision); Functions.collision(new Rectangle(642 + Lvl1.backx, 250, 23, 349), Lvl1.scott.scottr, Lvl1.scott.speed, Lvl1.collision); Functions.collision(new Rectangle(604 + Lvl1.backx, 250, 39, 50), Lvl1.scott.scottr, Lvl1.scott.speed, Lvl1.collision); Functions.collision(new Rectangle(596 + Lvl1.backx, 398, 52, 52), Lvl1.scott.scottr, Lvl1.scott.speed, Lvl1.collision); Functions.collision(new Rectangle(606 + Lvl1.backx, 550, 39, 48), Lvl1.scott.scottr, Lvl1.scott.speed, Lvl1.collision); Functions.collision(new Rectangle(450 + Lvl1.backx, 246, 51, 55), Lvl1.scott.scottr, Lvl1.scott.speed, Lvl1.collision); Functions.collision(new Rectangle(707 + Lvl1.backx, 101, 43, 53), Lvl1.scott.scottr, Lvl1.scott.speed, Lvl1.collision); Functions.collision(new Rectangle(248 + Lvl1.backx, 102, 104, 46), Lvl1.scott.scottr, Lvl1.scott.speed, Lvl1.collision); Functions.collision(new Rectangle(195 + Lvl1.backx, 100, 25, 301), Lvl1.scott.scottr, Lvl1.scott.speed, Lvl1.collision); Functions.collision(new Rectangle(-250 + Lvl1.backx, 201, 100, 101), Lvl1.scott.scottr, Lvl1.scott.speed, Lvl1.collision); Functions.collision(new Rectangle(-50 + Lvl1.backx, 202, 116, 99), Lvl1.scott.scottr, Lvl1.scott.speed, Lvl1.collision); Functions.collision(new Rectangle(63 + Lvl1.backx, 100, 30, 51), Lvl1.scott.scottr, Lvl1.scott.speed, Lvl1.collision); Functions.collision(new Rectangle(-3 + Lvl1.backx, 98, 51, 49), Lvl1.scott.scottr, Lvl1.scott.speed, Lvl1.collision); Functions.collision(new Rectangle(3 + Lvl1.backx, 157, 47, 46), Lvl1.scott.scottr, Lvl1.scott.speed, Lvl1.collision); Functions.collision(new Rectangle(45 + Lvl1.backx, 100, 21, 107), Lvl1.scott.scottr, Lvl1.scott.speed, Lvl1.collision); Functions.collision(new Rectangle(-245 + Lvl1.backx, 299, 42, 52), Lvl1.scott.scottr, Lvl1.scott.speed, Lvl1.collision); Functions.collision(new Rectangle(-241 + Lvl1.backx, 552, 39, 47), Lvl1.scott.scottr, Lvl1.scott.speed, Lvl1.collision); for (int x = 0; x < positionlist.Count; x++) { if (Scott.left) { positionlist[x] = new Vector2(positionlist[x].X + Lvl1.scott.speed.X, positionlist[x].Y); } else if (Scott.right) { positionlist[x] = new Vector2(positionlist[x].X - Lvl1.scott.speed.X, positionlist[x].Y); } } }
protected override void LoadContent() { spriteBatch = new SpriteBatch(Game.GraphicsDevice); select = new button(Game.Content.Load<Texture2D>("images/menu select"), new Vector2(45, 420), 0, new Point(0, 0), new Point(1, 1), new Point(121, 30)); background = Game.Content.Load<Texture2D>("images/battlebgdummy"); menu = Game.Content.Load<Texture2D>("images/Fight menu"); sf = Game.Content.Load<SpriteFont>("Font/SpriteFont1"); scott = new Scott(Game.Content.Load<Texture2D>("images/Scottbattle"), new Vector2(50, 335), new Point(35, 57), 16, new Point(0, 0), new Point(1, 1), new Vector2(0, 0), 0); if(Game1.boss_npc == false) npc_sprite = new NPC(Game.Content.Load<Texture2D>("images/enemyintern"), new Vector2(600, 235), new Point(108, 156), 16, new Point(0, 0), new Point(1, 1), new Vector2(0, 0), 0); else npc_sprite = new NPC(Game.Content.Load<Texture2D>("images/JonHoo"), new Vector2(600, 235), new Point(144, 167), 16, new Point(0, 0), new Point(1, 1), new Vector2(0, 0), 0); hp= Game.Content.Load<Texture2D>("images/npc_hp1"); hpt = Game.Content.Load<Texture2D>("images/npc_hp2"); //image for npc health is "npc_hp1" when full //and image for npc health when empty is "npc_hp2" select.height = 30; base.LoadContent(); }
public static void LoadContent(ContentManager Content) { tile = Content.Load<Texture2D>("images/test"); Jon=new NPC(Content.Load<Texture2D>("images/jon_overworld"), new Vector2(200 , 530), new Point(50, 70), 0, new Point(0, 0), new Point(1, 1), new Vector2(1, 1), 50); framesize = new Point(50,50); positionlist.Add(new Vector2(-50,100)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(0,100)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(50,100)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(50,150)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(100,150)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(100,200)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(50,200)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(50,250)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(0,200)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-50,200)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-50,150)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-100,150)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-100,100)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-100,150)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-100,200)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-50,200)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-50,150)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(0,150)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(50,150)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(50,200)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(100,200)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(100,250)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(50,250)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(0,250)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-50,250)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-100,250)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-250,0)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-200,0)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-150,0)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-100,0)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-50,0)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(0,0)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(50,0)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(100,0)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(150,0)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(200,0)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(250,0)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(300,0)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(350,0)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(400,0)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(450,0)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(500,0)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(500,50)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(500,100)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(500,150)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(500,200)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(500,250)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(500,300)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(500,350)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(500,400)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(500,450)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(500,500)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(500,550)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(450,550)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(400,550)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(350,550)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(300,550)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(250,550)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(200,550)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(150,550)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(100,550)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(50,550)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(0,550)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-50,550)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-200,550)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-150,550)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-100,550)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-50,550)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-100,550)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-150,550)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-200,550)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-250,550)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-250,500)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-250,450)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-250,400)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-250,350)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-250,300)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-250,250)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-250,200)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-250,150)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-250,100)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-250,50)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-200,50)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-150,50)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-100,50)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-50,50)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(0,50)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(50,50)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(100,50)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(150,50)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(200,50)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(250,50)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(300,50)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(350,50)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(400,50)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(450,50)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(450,100)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(450,150)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(450,200)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(450,250)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(450,300)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(450,350)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(450,400)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(450,450)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(450,500)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(400,500)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(350,500)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(300,500)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(250,500)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(200,500)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(150,500)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(100,500)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(50,500)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(0,500)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-50,500)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-100,500)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-150,500)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-200,500)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-200,450)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-200,400)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-200,350)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-200,300)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-200,250)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-200,200)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-200,150)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-200,100)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-150,100)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-150,150)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-150,200)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-150,250)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-150,300)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-150,350)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-150,400)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-150,450)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-100,450)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-50,450)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(0,450)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(50,450)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(100,450)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(150,450)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(200,450)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(250,450)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(300,450)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(350,450)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(400,450)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(400,400)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(400,350)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(400,300)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(400,250)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(400,200)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(400,150)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(400,100)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(100,100)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(150,100)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(200,100)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(250,100)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(300,100)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(350,100)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(350,150)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(350,200)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(350,250)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(350,300)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(350,350)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(350,400)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(300,400)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-100,300)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-100,350)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-100,400)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-50,400)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(0,400)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(50,400)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(100,400)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(150,400)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(200,400)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(250,400)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(150,150)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(150,200)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(150,250)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(150,300)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(150,350)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(200,350)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(250,350)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(300,350)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(300,300)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(300,250)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(300,200)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(300,150)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(250,150)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(200,150)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(200,200)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(250,200)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(250,250)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(200,250)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(200,300)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(250,300)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-50,300)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(0,300)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(50,300)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(100,300)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(100,350)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(50,350)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(0,350)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-50,350)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-50,300)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(550,0)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(600,0)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(650,0)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(650,100)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(650,150)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(650,200)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(650,150)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(650,100)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(650,50)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(650,0)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(650,50)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(600,50)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(550,50)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(550,0)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(550,50)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(550,100)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(600,100)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(600,150)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(600,200)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(600,150)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(550,150)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(550,200)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(550,250)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(550,300)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(550,350)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(550,400)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(550,450)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(550,500)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(550,550)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(600,550)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(600,500)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(600,450)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(600,400)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(600,350)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(600,300)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(600,250)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(650,250)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(700,250)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(700,300)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(700,350)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(650,350)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(650,400)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(600,400)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(600,350)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(650,350)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(650,300)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(650,350)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(650,400)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(650,450)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(650,500)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(650,550)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(700,550)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(700,500)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(700,450)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(700,400)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(700,350)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(700,400)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(700,350)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(700,300)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(700,250)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(700,200)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(700,150)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(700,100)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(700,50)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(700,100)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(700,50)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(700,0)); Currentframe.Add(new Point(0,2)); positionlist.Add(new Vector2(-300,0)); Currentframe.Add(new Point(3,1)); positionlist.Add(new Vector2(-300,50)); Currentframe.Add(new Point(3,1)); positionlist.Add(new Vector2(-300,100)); Currentframe.Add(new Point(3,1)); positionlist.Add(new Vector2(-300,150)); Currentframe.Add(new Point(3,1)); positionlist.Add(new Vector2(-300,200)); Currentframe.Add(new Point(3,1)); positionlist.Add(new Vector2(-300,250)); Currentframe.Add(new Point(3,1)); positionlist.Add(new Vector2(-300,300)); Currentframe.Add(new Point(3,1)); positionlist.Add(new Vector2(-300,350)); Currentframe.Add(new Point(3,1)); positionlist.Add(new Vector2(-300,400)); Currentframe.Add(new Point(3,1)); positionlist.Add(new Vector2(-300,450)); Currentframe.Add(new Point(3,1)); positionlist.Add(new Vector2(-300,500)); Currentframe.Add(new Point(3,1)); positionlist.Add(new Vector2(-300,550)); Currentframe.Add(new Point(3,1)); positionlist.Add(new Vector2(750,0)); Currentframe.Add(new Point(4,1)); positionlist.Add(new Vector2(750,50)); Currentframe.Add(new Point(4,1)); positionlist.Add(new Vector2(750,100)); Currentframe.Add(new Point(4,1)); positionlist.Add(new Vector2(750,150)); Currentframe.Add(new Point(4,1)); positionlist.Add(new Vector2(750,200)); Currentframe.Add(new Point(4,1)); positionlist.Add(new Vector2(750,250)); Currentframe.Add(new Point(4,1)); positionlist.Add(new Vector2(750,300)); Currentframe.Add(new Point(4,1)); positionlist.Add(new Vector2(750,350)); Currentframe.Add(new Point(4,1)); positionlist.Add(new Vector2(750,400)); Currentframe.Add(new Point(4,1)); positionlist.Add(new Vector2(750,450)); Currentframe.Add(new Point(4,1)); positionlist.Add(new Vector2(750,500)); Currentframe.Add(new Point(4,1)); positionlist.Add(new Vector2(750,550)); Currentframe.Add(new Point(4,1)); positionlist.Add(new Vector2(700,0)); Currentframe.Add(new Point(11,1)); positionlist.Add(new Vector2(650,0)); Currentframe.Add(new Point(10,1)); positionlist.Add(new Vector2(600,0)); Currentframe.Add(new Point(10,1)); positionlist.Add(new Vector2(550,0)); Currentframe.Add(new Point(10,1)); positionlist.Add(new Vector2(500,0)); Currentframe.Add(new Point(10,1)); positionlist.Add(new Vector2(450,0)); Currentframe.Add(new Point(10,1)); positionlist.Add(new Vector2(400,0)); Currentframe.Add(new Point(10,1)); positionlist.Add(new Vector2(350,0)); Currentframe.Add(new Point(10,1)); positionlist.Add(new Vector2(300,0)); Currentframe.Add(new Point(10,1)); positionlist.Add(new Vector2(250,0)); Currentframe.Add(new Point(10,1)); positionlist.Add(new Vector2(200,0)); Currentframe.Add(new Point(10,1)); positionlist.Add(new Vector2(150,0)); Currentframe.Add(new Point(10,1)); positionlist.Add(new Vector2(100,0)); Currentframe.Add(new Point(10,1)); positionlist.Add(new Vector2(150,0)); Currentframe.Add(new Point(10,1)); positionlist.Add(new Vector2(50,0)); Currentframe.Add(new Point(10,1)); positionlist.Add(new Vector2(0,0)); Currentframe.Add(new Point(10,1)); positionlist.Add(new Vector2(-50,0)); Currentframe.Add(new Point(10,1)); positionlist.Add(new Vector2(-100,0)); Currentframe.Add(new Point(10,1)); positionlist.Add(new Vector2(-200,0)); Currentframe.Add(new Point(10,1)); positionlist.Add(new Vector2(-150,0)); Currentframe.Add(new Point(10,1)); positionlist.Add(new Vector2(-250,0)); Currentframe.Add(new Point(9,1)); positionlist.Add(new Vector2(-250,50)); Currentframe.Add(new Point(9,2)); positionlist.Add(new Vector2(-200,50)); Currentframe.Add(new Point(10,2)); positionlist.Add(new Vector2(-150,50)); Currentframe.Add(new Point(10,2)); positionlist.Add(new Vector2(-100,50)); Currentframe.Add(new Point(10,2)); positionlist.Add(new Vector2(-50,50)); Currentframe.Add(new Point(10,2)); positionlist.Add(new Vector2(0,50)); Currentframe.Add(new Point(10,2)); positionlist.Add(new Vector2(50,50)); Currentframe.Add(new Point(10,2)); positionlist.Add(new Vector2(100,50)); Currentframe.Add(new Point(10,2)); positionlist.Add(new Vector2(150,50)); Currentframe.Add(new Point(10,2)); positionlist.Add(new Vector2(200,50)); Currentframe.Add(new Point(10,2)); positionlist.Add(new Vector2(250,50)); Currentframe.Add(new Point(10,2)); positionlist.Add(new Vector2(300,50)); Currentframe.Add(new Point(10,2)); positionlist.Add(new Vector2(350,50)); Currentframe.Add(new Point(10,2)); positionlist.Add(new Vector2(700,50)); Currentframe.Add(new Point(11,2)); positionlist.Add(new Vector2(400,50)); Currentframe.Add(new Point(10,2)); positionlist.Add(new Vector2(450,50)); Currentframe.Add(new Point(10,2)); positionlist.Add(new Vector2(500,50)); Currentframe.Add(new Point(10,2)); positionlist.Add(new Vector2(550,50)); Currentframe.Add(new Point(10,2)); positionlist.Add(new Vector2(600,50)); Currentframe.Add(new Point(10,2)); positionlist.Add(new Vector2(650,50)); Currentframe.Add(new Point(10,2)); positionlist.Add(new Vector2(-250,0)); Currentframe.Add(new Point(0,0)); positionlist.Add(new Vector2(-200,0)); Currentframe.Add(new Point(1,0)); positionlist.Add(new Vector2(-150,0)); Currentframe.Add(new Point(1,0)); positionlist.Add(new Vector2(-100,0)); Currentframe.Add(new Point(1,0)); positionlist.Add(new Vector2(-50,0)); Currentframe.Add(new Point(1,0)); positionlist.Add(new Vector2(0,0)); Currentframe.Add(new Point(2,0)); positionlist.Add(new Vector2(-250,50)); Currentframe.Add(new Point(0,1)); positionlist.Add(new Vector2(-200,50)); Currentframe.Add(new Point(1,1)); positionlist.Add(new Vector2(-150,50)); Currentframe.Add(new Point(1,1)); positionlist.Add(new Vector2(-100,50)); Currentframe.Add(new Point(1,1)); positionlist.Add(new Vector2(-50,50)); Currentframe.Add(new Point(1,1)); positionlist.Add(new Vector2(0,50)); Currentframe.Add(new Point(2,1)); positionlist.Add(new Vector2(50,0)); Currentframe.Add(new Point(4,0)); positionlist.Add(new Vector2(50,50)); Currentframe.Add(new Point(4,1)); positionlist.Add(new Vector2(50,100)); Currentframe.Add(new Point(4,1)); positionlist.Add(new Vector2(0,200)); Currentframe.Add(new Point(2,0)); positionlist.Add(new Vector2(0,250)); Currentframe.Add(new Point(2,1)); positionlist.Add(new Vector2(-250,250)); Currentframe.Add(new Point(0,1)); positionlist.Add(new Vector2(-250,200)); Currentframe.Add(new Point(0,0)); positionlist.Add(new Vector2(50,250)); Currentframe.Add(new Point(4,2)); positionlist.Add(new Vector2(50,150)); Currentframe.Add(new Point(4,1)); positionlist.Add(new Vector2(50,200)); Currentframe.Add(new Point(4,1)); positionlist.Add(new Vector2(-50,200)); Currentframe.Add(new Point(0,0)); positionlist.Add(new Vector2(-50,250)); Currentframe.Add(new Point(0,1)); positionlist.Add(new Vector2(-200,200)); Currentframe.Add(new Point(2,0)); positionlist.Add(new Vector2(-200,250)); Currentframe.Add(new Point(2,1)); positionlist.Add(new Vector2(-250,0)); Currentframe.Add(new Point(5,0)); positionlist.Add(new Vector2(-200,0)); Currentframe.Add(new Point(6,0)); positionlist.Add(new Vector2(-250,50)); Currentframe.Add(new Point(5,1)); positionlist.Add(new Vector2(-200,50)); Currentframe.Add(new Point(6,1)); positionlist.Add(new Vector2(0,100)); Currentframe.Add(new Point(7,0)); positionlist.Add(new Vector2(0,150)); Currentframe.Add(new Point(7,1)); positionlist.Add(new Vector2(650,550)); Currentframe.Add(new Point(4,2)); positionlist.Add(new Vector2(650,500)); Currentframe.Add(new Point(4,1)); positionlist.Add(new Vector2(650,450)); Currentframe.Add(new Point(4,1)); positionlist.Add(new Vector2(650,400)); Currentframe.Add(new Point(4,1)); positionlist.Add(new Vector2(650,350)); Currentframe.Add(new Point(4,1)); positionlist.Add(new Vector2(650,300)); Currentframe.Add(new Point(4,1)); positionlist.Add(new Vector2(650,250)); Currentframe.Add(new Point(4,1)); positionlist.Add(new Vector2(650,200)); Currentframe.Add(new Point(4,1)); positionlist.Add(new Vector2(650,150)); Currentframe.Add(new Point(4,0)); positionlist.Add(new Vector2(600,200)); Currentframe.Add(new Point(2,1)); positionlist.Add(new Vector2(600,150)); Currentframe.Add(new Point(2,0)); positionlist.Add(new Vector2(550,150)); Currentframe.Add(new Point(1,0)); positionlist.Add(new Vector2(500,150)); Currentframe.Add(new Point(1,0)); positionlist.Add(new Vector2(450,150)); Currentframe.Add(new Point(1,0)); positionlist.Add(new Vector2(550,200)); Currentframe.Add(new Point(1,1)); positionlist.Add(new Vector2(500,200)); Currentframe.Add(new Point(1,1)); positionlist.Add(new Vector2(450,200)); Currentframe.Add(new Point(1,1)); positionlist.Add(new Vector2(400,150)); Currentframe.Add(new Point(0,0)); positionlist.Add(new Vector2(400,200)); Currentframe.Add(new Point(0,1)); positionlist.Add(new Vector2(50,100)); Currentframe.Add(new Point(7,1)); positionlist.Add(new Vector2(600,250)); Currentframe.Add(new Point(7,1)); positionlist.Add(new Vector2(600,550)); Currentframe.Add(new Point(7,1)); positionlist.Add(new Vector2(700,100)); Currentframe.Add(new Point(7,1)); positionlist.Add(new Vector2(-250,550)); Currentframe.Add(new Point(7,1)); positionlist.Add(new Vector2(-250,300)); Currentframe.Add(new Point(7,1)); positionlist.Add(new Vector2(200,100)); Currentframe.Add(new Point(4,0)); positionlist.Add(new Vector2(200,150)); Currentframe.Add(new Point(4,1)); positionlist.Add(new Vector2(200,200)); Currentframe.Add(new Point(4,1)); positionlist.Add(new Vector2(200,250)); Currentframe.Add(new Point(4,1)); positionlist.Add(new Vector2(200,300)); Currentframe.Add(new Point(4,1)); positionlist.Add(new Vector2(200,350)); Currentframe.Add(new Point(4,2)); positionlist.Add(new Vector2(450,250)); Currentframe.Add(new Point(7,0)); positionlist.Add(new Vector2(600,400)); Currentframe.Add(new Point(7,0)); positionlist.Add(new Vector2(300,50)); Currentframe.Add(new Point(6,0)); positionlist.Add(new Vector2(250,50)); Currentframe.Add(new Point(5,0)); positionlist.Add(new Vector2(250,100)); Currentframe.Add(new Point(5,1)); positionlist.Add(new Vector2(300,100)); Currentframe.Add(new Point(6,1)); }
public override void Update(GameTime gameTime) { if (Game1.boss_npc == true) { npc_sprite = new NPC(Game.Content.Load<Texture2D>("images/JonHoo"), new Vector2(600, 235), new Point(144, 167), 16, new Point(0, 0), new Point(1, 1), new Vector2(0, 0), 0); Game1.boss_npc = false; } else if (Game1.normal_npc == true) { npc_sprite = new NPC(Game.Content.Load<Texture2D>("images/enemyintern"), new Vector2(600, 235), new Point(144, 167), 16, new Point(0, 0), new Point(1, 1), new Vector2(0, 0), 0); Game1.normal_npc = false; } if(npc_hp <= 0) timer2 += gameTime.ElapsedGameTime.Milliseconds; if (npc_hp >= 0 && timer > 500) { //Game1.scott_def += defense_boost; intern_attack(); internattack = false; usrattack = true; timer = 0; } else if (npc_hp <= 0 && timer > 3000) { Game1.screen_selector = 3; } else if (internattack) { timer += gameTime.ElapsedGameTime.Milliseconds; } KeyboardState ks = Keyboard.GetState(); if (yes) { last = ks; yes = false; } if (ks.IsKeyDown(Keys.Up) && last.IsKeyUp(Keys.Up) && select.position.Y > 420) { if(select.position.X==45) select.position.Y -= 50; else if (select.position.X == 318) select.position.Y -= 44; audioframe.playSound(7); } else if (ks.IsKeyDown(Keys.Down) && last.IsKeyUp(Keys.Down) && select.position.Y < 520) { if (select.position.X == 45) select.position.Y += 50; else if (select.position.X == 318&&select.position.Y<(350+(44*Submenu.opnumber))) select.position.Y += 44; audioframe.playSound(7); } else if (ks.IsKeyDown(Keys.Right) && last.IsKeyUp(Keys.Right) && select.position.X != 318) { select.position.X = 318; select.position.Y = 412; Submenu.menuu = true; audioframe.playSound(7); } else if (ks.IsKeyDown(Keys.Left) && last.IsKeyUp(Keys.Left) && select.position.X == 318) { select.position.X = 45; select.position.Y = 420; Submenu.menuu = false; audioframe.playSound(7); } else if (ks.IsKeyDown(Keys.Enter) && last.IsKeyUp(Keys.Enter) && select.position.X == 318 && usrattack && npc_hp > 0) { if (Submenu.subselect == 1) { scott_att_choice(Submenu.decision+1); internattack = true; usrattack = false; } else if (Submenu.subselect == 2) { scott_def_choice(Submenu.decision + 1); internattack = true; usrattack = false; } else if (Submenu.subselect == 3) { if(Inventory.item1.Count>0) Inventory.useitem(Submenu.decision+1); // scott_item_choice(Submenu.decision + 1); } } if (select.position.Y == 420) { Submenu.menutype = 3; } else if (select.position.Y == 470) { Submenu.menutype = 4; } else if (select.position.Y == 520) { Submenu.menutype = 6; } Submenu.yes = true; Game1.screen_selector = 7; last = ks; if (select.position.X == 45) { for (int x = 0; x < 3; x++) { if (select.position.Y == (420 + (50 * x))) { size = sf.MeasureString(options[x]); select.wide = (int)size.X + 15; } } } else { for (int x = 0; x < Submenu.opnumber; x++) { if (select.position.Y == (412 + (44 * x))) { size = sf.MeasureString(Submenu.options[x]); select.wide = (int)size.X + 5; } } } if (Game1.scott_hp <= 0) { Game1.scott_hp = 0; Game1.screen_selector = 6; } else if (npc_hp <= 0) { npc_hp = 0; if (Game1.boss_npc == true) { audioframe.boss_instance.Stop(); audioframe.office_theme_instance.Play(); Game1.boss_npc = false; } } base.Update(gameTime); }