Skip to content

Commit

Permalink
fixed minor things and added a description to the main menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-Perdue committed Mar 14, 2022
1 parent 77a19ca commit daf6942
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Characters/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ private Vector2 calculateLookAt()
positionNew.Y = Scene.TileToGridLocation(new Point(pos.X, -1)).Y;
if (pos.X < 0)
positionNew.X = Scene.TileToGridLocation(new Point(0, pos.Y)).X;
if (pos.X > 59) //59 is at 750 resolution the max to the right you can go before seeing blue space
if (pos.X > 59) //59 is at 750 resolution the max to the tile to the right you can go before seeing blue space
positionNew.X = Scene.TileToGridLocation(new Point(60, pos.Y)).X;

return positionNew;
Expand Down
11 changes: 10 additions & 1 deletion Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public class Game : TileEngineGame
private RectangleButton startButton;
private Picture guiImage;
private Label title;
private Label description;
public void StartGame(Point location)
{
SoundInstance soundInstance = TileEngine.Instance.Sound.PlaySound(TileEngine.Instance.Sound.LoadSound("Sound/click.mp3"));
Expand All @@ -31,6 +32,7 @@ public void StartGame(Point location)
UI.RemoveElement(startButton);
UI.RemoveElement(guiImage);
UI.RemoveElement(title);
UI.RemoveElement(description);
mainPlayer = new Player();
var entity = new Entities.Entity("Assets/TestModel.png");
TileEngine.Instance.SetScene(typeof(AlexandraSquare));
Expand Down Expand Up @@ -65,11 +67,18 @@ public override void Initialize()
Label label = new Label();
label.Text = "Start game";
label.FontSize = 32;
label.Colour = Color.Black;
label.Colour = Color.White;
description = new Label();
description.Text = "How to play:\n- Try to get the highest score\n - Defeat enemies to increase your score (different types give different amounts)\n - Complete waves quickly to increase your score\n- Upon the start of a wave enemies will spawn\n- Defeat all enemies to progress to the next wave\n- As the wave your on increases the amount of enemies and the type of enemies change";
description.FontSize = 26;
description.Colour = Color.White;
description.Anchor = UIAnchor.Center;
description.Offset = new Vector2(0, 150);
startButton.Label = label;
UI.AddElement(title);
UI.AddElement(startButton);
UI.AddElement(guiImage);
UI.AddElement(description);
TileEngine.Instance.SetScene(typeof(Spar));
}

Expand Down

0 comments on commit daf6942

Please sign in to comment.