/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { using (Arktet game = new Arktet()) { game.Run(); } }
//Constructor public Settings(ContentManager content, Arktet ArkTet) { ark = ArkTet; PlusButton = content.Load<Texture2D>(@"images/Buttons/+Button"); MinButton = content.Load<Texture2D>(@"images/Buttons/-Button"); titlebg = content.Load<Texture2D>(@"images/Backgrounds/titlescreen"); arialbigblue = content.Load<SpriteFont>(@"arialbluebig"); BackButton = content.Load<Texture2D>(@"images/Buttons/Back"); BackButtonRect = new Rectangle(500, 600, 300, 100); PlusButtonRect = new Rectangle(550, 192, PlusButton.Width, PlusButton.Height); MinButtonRect = new Rectangle(750, 192, MinButton.Width, MinButton.Height); _content = content; }
public void Update(GameTime gt, int Score1, int Score2, Arktet arktet) { ScorePlayer1 = Score2; ScorePlayer2 = Score1; mState = Mouse.GetState(); if (mState.X > BackButtonRect.Left && mState.X < BackButtonRect.Right && mState.Y > BackButtonRect.Top && mState.Y < BackButtonRect.Bottom) { BackButton = Content.Load<Texture2D>(@"images/Buttons/ExitHover"); if (mState.LeftButton == ButtonState.Pressed && OldmState.LeftButton == ButtonState.Released) { arktet.Exit(); } } else { BackButton = Content.Load<Texture2D>(@"images/Buttons/Exit"); } OldmState = mState; }