public void StartNewGame() { //we want to load in the game initialization settings TFSH.PokeEngineScriptHelper.Initialize(graphics, content, font, world); lua = new Lua(); previousTime = 0; //MAKE TEST MAP world.getBounds(); world.changeZone("test"); //GameDraw.makeGroundBuffers(map); GameDraw.MakeAdjBuffers(world); GameDraw.UpdateNPCSpritesheets(world); //MAKE PLAYER player = new PC.Player(); player.name = "EncyKal"; player.spriteSheet = "overworld.png"; player.tileCoords = new Point(4, 4); loadPlayerTextureSheet(); //TFSH.PokeEngineScriptHelper.setMap("test", 6, 6); for (int i = 0; i < player.IdentifiedPokemon.Length; i++) { if (i % 3 != 0) { player.IdentifiedPokemon[i] = true; } } //world.currentArea.tile[6, 6].setOccupied(true); GameDraw.UpdateNPCSpritesheets(world); //PokedexScreen.SetUpPokedex(player); }
public GameScreen(GraphicsDeviceManager g, ContentManager c, SpriteFont f) : base(g, c, f) { //initialize GameDraw GameDraw.Initialize(g, c, f); GameDraw.drawAdjObjects = true; KeyConfig.Initialize(); StopDrawing = false; }
/// <summary> /// This method is called once per frame (60fps is desired) to draw. /// </summary> public override void Draw(SpriteBatch spriteBatch) { if (IsVisible && !StopDrawing) //StopDrawing is used while transitioning zones { //updateSpriteLocation(player); //graphics.GraphicsDevice.Clear(Color.CornflowerBlue); //GameDraw.drawGround(map, player); GameDraw.DrawAdjacentGround(world, player); GameDraw.DrawScenery(world); GameDraw.DrawPlayer(player, world, player.spritePosition, new Rectangle(0, 0, 116, 153)); GameDraw.DrawNPCs(world); if (inMenu) { menu.Draw(spriteBatch, font, Color.White); } } }
public override void Draw(SpriteBatch spriteBatch) { if (IsVisible) { GameDraw.DrawAdjacentGround(world, viewLocation); GameDraw.DrawScenery(world); //NPCs will be drawn with it's own method //NPCs from adjacent areas will NOT be drawn if (!hideNPCs) { GameDraw.DrawNPCs(NPCs, world); } if (!hidePlayer) { GameDraw.DrawUncontroledPlayer(GameScreen.player, world); } spriteBatch.Draw(barTexture, topBarRect, Color.White); spriteBatch.Draw(barTexture, bottomBarRect, Color.White); } }
public GameScreen(GraphicsDeviceManager g, ContentManager c, SpriteFont f) : base(g, c, f) { //initialize GameDraw GameDraw.Initialize(g, c, f); GameDraw.drawAdjObjects = true; KeyConfig.Initialize(); StopDrawing = false; StartNewGame(); List <string> optionList = new List <string>(); optionList.Add("Pokedex"); optionList.Add(player.name); optionList.Add("Pokemon"); optionList.Add("Save"); optionList.Add("Bag"); optionList.Add("Options"); menu = new MenuWindow(MENU_POS, optionList, MENU_PADDING); inMenu = false; Name = "GameScreen"; }