public event ElementClicked PressEvent; // chamada sempre que o enter é pressionado de forma a saber onde esta a presssionar #endregion public MainMenu() { #region MenuStuff menu = Game1.sContent.Load <Texture2D>("Menu"); menuRect = new Rectangle(menu.Bounds.X, menu.Bounds.Y, menu.Width + 416, menu.Height + 240); Vector2 startSize = new Vector2(100, 200); Vector2 startPosition = new Vector2(300, 450); startRect = new Rectangle((int)startPosition.X, (int)startPosition.Y, (int)startSize.X, (int)startSize.Y); Vector2 exitSize = new Vector2(75, 200); Vector2 exitPosition = new Vector2(1200, 475); exitRect = new Rectangle((int)exitPosition.X, (int)exitPosition.Y, (int)exitSize.X, (int)exitSize.Y); #endregion #region PlayerStuff ChaoPlataforma = new Plataforma(false, platSize, platPosition); plataforma.Add(ChaoPlataforma); c = new Character("SpriteBrazilianRyu", cPosition, cSize, plataforma); #endregion #region MapSelect museu = Game1.sContent.Load <Texture2D>("MapSelection"); museuRect = new Rectangle(museu.Bounds.X, museu.Bounds.Y, museu.Width, museu.Height); #endregion PressEvent += Events; }
public Map(Vector2 size, Vector2 position, string imageName) : base(imageName, position, size) { this.Size = size; this.Position = position; if (imageName.Equals("map1")) { platPosition = new Vector2(2150, 365); platSize = new Vector2(1000, 100); plat = new Plataforma(false, platSize, platPosition); ListaPlataformas.Add(plat); /////////////////////////////////////// platPosition = new Vector2(420, 645); platSize = new Vector2(1100, 100); plat = new Plataforma(false, platSize, platPosition); ListaPlataformas.Add(plat); } else if (imageName.Equals("map2")) { //////////////////////////////////////// dir platPosition = new Vector2(425, 680); platSize = new Vector2(650, 60); plat = new Plataforma(true, platSize, platPosition); ListaPlataformas.Add(plat); /////////////////////////////////////// esq platPosition = new Vector2(2055, 680); platSize = new Vector2(640, 60); plat = new Plataforma(true, platSize, platPosition); ListaPlataformas.Add(plat); /////////////////////////////////////// main platPosition = new Vector2(1225, 105); platSize = new Vector2(1825, 210); plat = new Plataforma(false, platSize, platPosition); ListaPlataformas.Add(plat); } }