-
Notifications
You must be signed in to change notification settings - Fork 11
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
base: master
Are you sure you want to change the base?
Conversation
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) |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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?
No description provided.