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

[Feature] Block protagonist from starting dialogue if not in Gameplay state #433

Conversation

soloschenko-grigoriy
Copy link
Contributor

@soloschenko-grigoriy soloschenko-grigoriy commented May 19, 2021

Forum link: https://forum.unity.com/threads/enemy-attacks-protagonist-during-a-dialogue.1103305/

This PR blocks protagonist from starting dialogue if game is currently in any state but Gameplay.

  1. Block UI Interaction Panel from popping up if Game State is not Gameplay
  2. Similarly, preventing dialogue from starting if Game State is not Gameplay
  3. Prevent Game from updating its state if new one is the same as current. This is helpful since otherwise previous state becomes the same as current and ResetToPreviousGameState looses its purpose

Note: I do apologies for whitespace noise... My editor is kinda picky...

@soloschenko-grigoriy soloschenko-grigoriy changed the title Block protagonist from starting dialogue if not in Gameplay state [Feature] Block protagonist from starting dialogue if not in Gameplay state May 19, 2021
@soloschenko-grigoriy soloschenko-grigoriy force-pushed the feature/block-protaginist-from-starting-dialogue-not-in-gameplay-state branch from f382f1a to 4d45145 Compare May 20, 2021 21:41
… into feature/block-protaginist-from-starting-dialogue-not-in-gameplay-state
… into feature/block-protaginist-from-starting-dialogue-not-in-gameplay-state
… into feature/block-protaginist-from-starting-dialogue-not-in-gameplay-state
@uChema uChema self-assigned this Jun 16, 2021
@uChema
Copy link
Contributor

uChema commented Jun 16, 2021

Hey ! Thanks for the PR!
I'm looking into it (at the same time as the other PR you opened #434 ).
I've added a control on the interaction button (in the InputReader.cs). Since the UI has nothing to do with the interaction in itself, even it the interaction panel is not shown on screen, you can still interact with the character/pot/item.

@ciro-unity ciro-unity added the enhancement New feature or request label Jun 19, 2021
@uChema
Copy link
Contributor

uChema commented Aug 23, 2021

Hey @soloschenko-grigoriy ,
Thanks for your contribution ! We merged the #434 PR you opened later on.
We're now using the StateMachine system to control the GameState and we don't have a problem with starting a dialogue if not in Gameplay State.

@uChema uChema closed this Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants