protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); GameManager.Content = this.Content; Map map = new Map(); map.LoadMapFromImage(Content.Load<Texture2D>("Map")); GameManager.AddGameObject(map); player = new Player(new Vector2(17, 12)); GameManager.AddGameObject(player); playerAnimation = new SpriteAnimation("player", Content.Load<Texture2D>("playerMovement"), Content.RootDirectory + "/playerMovement.xml"); player.SpriteAnimation = playerAnimation; player.SpriteAnimation.FrameDelay = 200; camera.SetTarget(player); // UI healthBar = new UILabel(Fonts.Arial, new Vector2(camera.X, camera.Y), ("HP: " + Player.Health.ToString() + ""), 0.5f, Color.Black); DialogBox = new UITexture(new Vector2(camera.X, camera.Y), Color.White, "800x120_gray"); //Pokemons bisasam = new Pokemon(new Vector2( 3, 3 ), "Bisasam", "bisasam1", 120, 5, 10, 0, 2, "plant", true); bisasam = new Pokemon(new Vector2(31, 9 ), "Bisasam", "bisasam2", 20, 5, 5, 0, 2, "plant", false); bisasam = new Pokemon(new Vector2(32, 9 ), "Bisasam", "bisasam3", 20, 5, 5, 0, 2, "plant", false); bisasam = new Pokemon(new Vector2(32, 10 ), "Bisasam", "bisasam4", 20, 5, 5, 0, 2, "plant", false); bisasam = new Pokemon(new Vector2(31, 10), "Bisasam", "bisasam5", 20, 5, 5, 0, 2, "plant", false); bisasam = new Pokemon(new Vector2(30, 9 ), "Bisasam", "bisasam6", 20, 5, 5, 0, 2, "plant", false); bisasam = new Pokemon(new Vector2(30, 10), "Bisasam", "bisasam7", 20, 5, 5, 0, 2, "plant", false); bisasam = new Pokemon(new Vector2(14, 19), "Bisasam", "bisasam8", 20, 5, 5, 0, 2, "plant", false); //Items potion = new Potion(new Vector2(1, 1), Content.RootDirectory + "/items.xml", "PotionRed"); potion2 = new Potion(new Vector2(30, 12), Content.RootDirectory + "/items.xml", "PotionRed"); }
public void SetTarget(Player player) { this.player = player; }