-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Update README.md #20
Update README.md #20
Conversation
docs: MESSAGE HERE on line #97 - 108
This is a great idea. I'll try to fix this up a bit so it encompasses a basic usage example. |
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.
Sorry this got buried in here. I love the example. Added a few quick suggestions that should just require a click to make this merge ready.
### Initializing a Dialogue | ||
|
||
You can initialize a dialogue using the .Play method, as show in the following script : | ||
https://github.com/ashblue/fluid-dialogue/blob/develop/Assets/Examples/BasicConversation/Scripts/ExampleDialoguePlayback.cs#L56 |
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.
Line numbers change so let's remove that, but linking to the file is a great idea.
https://github.com/ashblue/fluid-dialogue/blob/develop/Assets/Examples/BasicConversation/Scripts/ExampleDialoguePlayback.cs#L56 | |
https://github.com/ashblue/fluid-dialogue/blob/develop/Assets/Examples/BasicConversation/Scripts/ExampleDialoguePlayback.cs |
https://github.com/ashblue/fluid-dialogue/blob/develop/Assets/Examples/BasicConversation/Scripts/ExampleDialoguePlayback.cs#L56 | ||
|
||
``` | ||
private void Awake () { |
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.
Adding in all the logic to run this to minimize the amount of digging necessary to run it.
private void Awake () { | |
using System.Collections; | |
using System.Linq; | |
using CleverCrow.Fluid.Databases; | |
using CleverCrow.Fluid.Dialogues.Graphs; | |
using UnityEngine; | |
public class ExampleDialoguePlayback : MonoBehaviour { | |
private DialogueController _ctrl; | |
public DialogueGraph dialogue; | |
public GameObjectOverride[] gameObjectOverrides; | |
private void Awake () { |
var database = new DatabaseInstanceExtended(); | ||
_ctrl = new DialogueController(database); | ||
_ctrl.Play(dialogue, gameObjectOverrides.ToArray<IGameObjectOverride>()); | ||
} |
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.
Indentation fix.
var database = new DatabaseInstanceExtended(); | |
_ctrl = new DialogueController(database); | |
_ctrl.Play(dialogue, gameObjectOverrides.ToArray<IGameObjectOverride>()); | |
} | |
var database = new DatabaseInstanceExtended(); | |
_ctrl = new DialogueController(database); | |
_ctrl.Play(dialogue, gameObjectOverrides.ToArray<IGameObjectOverride>()); | |
} |
Also looks like the commit message needs to be reformatted as |
@all-contributors please add @bosaku for documentation |
1 similar comment
@all-contributors please add @bosaku for documentation |
I've put up a pull request to add @bosaku! 🎉 |
Closing in favor of #37 |
docs: MESSAGE HERE on line #97 - 108