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

Fix misc. #49

Merged
merged 14 commits into from
Oct 17, 2021
Merged

Fix misc. #49

merged 14 commits into from
Oct 17, 2021

Conversation

ddabble
Copy link
Member

@ddabble ddabble commented Oct 11, 2021

Highlights:

  • Renamed Back button to Cancel, and changed the key to Esc (b33da98)
  • Added debug variable for the current player state (8ee029e)
  • Only update/set focused interactable in specific player states (38ab01b)
    • This fixes a bug that let the player change the direction of nearby towers while in the turret selection menu
  • Misc. code cleanup (see the remaining commits not mentioned in this description)

It might be a better idea to move the enums to separate files, but this will do for now.
Also reordered some of the overridden methods, so that they appear in the same order as in the abstract class.
This removes the need to check whether an element exists in the set, which is fairly inefficient compared to just using a set.
This makes the value of `CurrentState` visible in the inspector, but unable to be written to.
This fixes a bug that let the player change the direction of nearby towers while in the turret selection menu.
Copy link
Collaborator

@Fueredoriku Fueredoriku left a comment

Choose a reason for hiding this comment

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

Looks good! Tested and read.

Copy link
Collaborator

@SondreHus SondreHus left a comment

Choose a reason for hiding this comment

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

Not sure if interactable functions should be abstact instead of virtual.

Assets/Scripts/Interactables/Interactable.cs Show resolved Hide resolved
Copy link
Collaborator

@Fueredoriku Fueredoriku left a comment

Choose a reason for hiding this comment

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

Works on my machine™

@ddabble ddabble merged commit 76b18a0 into develop Oct 17, 2021
@ddabble ddabble deleted the fix/misc branch October 17, 2021 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants