Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #146
This PR adds the ability to click through lines of dialogue during a story event by progressing through each story point when clicked until ultimately resetting and hiding the canvas.
Testing
Load up the test scene
Assets/Scenes/Test/StoryMonoSystem_Test/StoryMonoSystemScene_Test.unity
and click the red box. Then, click through the two separate lines of dialogue that should have different character names. Finally, make sure the scene returns to normal, displaying the red box again.Considerations
I tried to follow this outline:
I used a C# event/action to communicate between the dialogue panel and the controller and used the message bus and a direct reference at times to communicate between the controller and the monosystem, following the architecture we had laid out during previous work.
I ended up refactoring the
StoryMonoSystem.GetCurrentStoryPoint()
andStoryMonoSystem.HasStoryEventEnded()
methods a bit by introducing a third method calledStoryMonoSystem.AdvanceStoryPoint()
in order to separate functionality a little more clearly. Before the refactor, theStoryPointIndex
could exceed the number of story points in the story event and the code I wrote to fix that within the original method made everything feel kinda messy.