Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple Main Menu, Stage Selection, Pause Menu, Game Over Menu #7

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

vincdec
Copy link

@vincdec vincdec commented May 27, 2018

No description provided.

vincdec added 3 commits May 27, 2018 16:19
Added Main Menu, Stage Selection, Level w pause menu, Game Over Scenes
Changelogs
- Menu.cs 
Display Game Menu
-StageSelection.cs
Display Stage Selection Difficulty
-Pauser.cs
Display Pause menu
- Enemies.cs
Adjust enemies HP and movement speed to selected stage difficulty
- Timer.cs
Display Timer/ Gameover when Timer reaches <=0
- PlayerHealth.cs
Display Gameover when Health reaches 0
- Gameover.cs
Display Gameover Menu
ren = transform.Find("body").GetComponent<SpriteRenderer>();
frontCheck = transform.Find("frontCheck").transform;
score = GameObject.Find("Score").GetComponent<Score>();
switch (StageSelection.Difficulty)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it make more sense to make StageSelection.Difficulty an enum instead of a string?

{
const int width = 120, height = 60;

Rect buttonRect = new Rect(Screen.width / 2 - (width / 2), (2 * Screen.height / 3) - (height / 2), width, height);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dynamic sizing is present in a few places in the code you submitted, would there be a way to abstract the calculation somewhere so to increase the code's readability?


public class Timer : MonoBehaviour {

public float TimeLeft;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to make TimeLeft an integer and cast when subtracting the delta instead? Would it help readability?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants