public mapCollision(Game game, PlayerToken player,Map map, ActionScene actionscene) : base(game) { this.player = player; this.map = map; this.poe = map.poe; this.collisions = map.collisions; this.actionscene = actionscene; // TODO: Construct any child components here }
public ActionScene(Game game, SpriteBatch spriteBatch) : base(game) { this.game = game; this.spriteBatch = spriteBatch; start = new Map(game, spriteBatch, "Content\\Maps\\Indoor.tmx"); this.Components.Add(start); forest[0] = new Map(game, spriteBatch, "Content\\Maps\\Outdoor.tmx"); forest[1] = new Map(game, spriteBatch, "Content\\Maps\\Forest-1.tmx"); forest[2] = new Map(game, spriteBatch, "Content\\Maps\\Forest-2.tmx"); forest[3] = new Map(game, spriteBatch, "Content\\Maps\\Forest-3.tmx"); cave[0] = new Map(game, spriteBatch, "Content\\Maps\\cave-1.tmx"); cave[1] = new Map(game, spriteBatch, "Content\\Maps\\cave-2.tmx"); cave[2] = new Map(game, spriteBatch, "Content\\Maps\\cave-3.tmx"); cave[3] = new Map(game, spriteBatch, "Content\\Maps\\cave-4.tmx"); foreach (Map item in forest) { this.Components.Add(item); item.Visible = false; item.Enabled = false; } foreach (Map item in cave) { this.Components.Add(item); item.Visible = false; item.Enabled = false; } player = new PlayerToken(game, spriteBatch, game.Content.Load<Texture2D>("Images/Walk"), new Vector2(204, 86), 10); col = new mapCollision(game, player, forest[0], this); bossOne = new ShineGreymonIdle(game, spriteBatch, new Vector2(75, 96), 30); bossTwo = new PhoenixIdleHFlipped(game, spriteBatch, new Vector2(320, 115), 30); //bossTwo = new PhoenixIdleHFlipped(game, spriteBatch, new Vector2(0, 100), 30); this.Components.Add(col); this.Components.Add(player); font = game.Content.Load<SpriteFont>("Fonts/pixelFont"); this.Components.Add(bossOne); this.Components.Add(bossTwo); bossOne.Enabled = false; bossOne.Visible = false; bossTwo.Enabled = false; bossTwo.Visible = false; text = new TextBox(game, spriteBatch, font, 0, "12345678901234567890123456789012345678901234567\nline2\nline3 [...]", 5); this.Components.Add(text); //text.Visible = false; //text.Enabled = false; }