Skip to content

Commit

Permalink
Merge pull request #9 from Studio-23-xyz/dev
Browse files Browse the repository at this point in the history
Set graph when startdialogue is called
  • Loading branch information
BDeshiDev authored Jan 11, 2024
2 parents e125554 + ed67b34 commit e66859f
Show file tree
Hide file tree
Showing 38 changed files with 53 additions and 65 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,7 @@ MonoBehaviour:
m_Data:
m_SerializedData: []
m_GUID: 1040aa312d4f02443b5e508db1e56754
m_SerializeEntries:
- m_GUID: 86a08eccdabf3a24e812720793183e8e
m_Address: Assets/Packages/com.studio23.ss2.dialoguesystem/Samples/DialogueChoiceDemo/Configuration/Localization/String
Table 1 Shared Data.asset
m_ReadOnly: 1
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
m_SerializeEntries: []
m_ReadOnly: 1
m_Settings: {fileID: 11400000, guid: 45bcaa0f9119bdc44b426e7814210719, type: 2}
m_SchemaSet:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ MonoBehaviour:
m_SerializedData: []
m_GUID: 03f27369841114447820ea1aa4fd2b91
m_SerializeEntries:
- m_GUID: 6548a8cc5dd1d4b4fa1daabffe00c346
m_Address: English (en)
- m_GUID: cb3b6415cc22f1e40a0a2b90ca61e7ee
m_Address: Japanese (ja)
m_ReadOnly: 1
m_SerializedLabels:
- Locale
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: f3f0d6029270a944ea77ab0c23ee3d61
m_Address: Japanese (ja)
- m_GUID: 984fc40b570c0554e8360d17f7a4bc82
m_Address: English (en)
m_ReadOnly: 1
m_SerializedLabels:
- Locale
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,7 @@ MonoBehaviour:
m_Data:
m_SerializedData: []
m_GUID: 3cd2dd60838011f4889bda962aee86d4
m_SerializeEntries:
- m_GUID: d4da86ebffb58044493a4c0cb8f68e1f
m_Address: String Table 1_en
m_ReadOnly: 1
m_SerializedLabels:
- Locale-en
FlaggedDuringContentUpdateRestriction: 0
m_SerializeEntries: []
m_ReadOnly: 1
m_Settings: {fileID: 11400000, guid: 45bcaa0f9119bdc44b426e7814210719, type: 2}
m_SchemaSet:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,7 @@ MonoBehaviour:
m_Data:
m_SerializedData: []
m_GUID: 299b8fcb43493c24dab08422c770f08d
m_SerializeEntries:
- m_GUID: b7ac3b9cc332a4d489a6248958a7992c
m_Address: String Table 1_ja
m_ReadOnly: 1
m_SerializedLabels:
- Locale-ja
FlaggedDuringContentUpdateRestriction: 0
m_SerializeEntries: []
m_ReadOnly: 1
m_Settings: {fileID: 11400000, guid: 45bcaa0f9119bdc44b426e7814210719, type: 2}
m_SchemaSet:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,14 @@ public class DialogueSystem : MonoBehaviour

void Awake()
{
Instance = this;
if (Instance != null)
{
Destroy(gameObject);
}
else
{
Instance = this;
}
}

/// <summary>
Expand All @@ -52,14 +59,14 @@ public void InitializeDialogueGraph(DialogueGraph newGraph)
/// <summary>
/// Start playing dialogue and it Fires the Start event
/// </summary>
public void StartDialogue()
public void StartDialogue(DialogueGraph graph)
{
PlayDialogue();
PlayDialogue(graph);
}

public async UniTask PlayDialogue()
public async UniTask PlayDialogue(DialogueGraph graph)
{
Debug.Log("START");
_currentGraph = graph;
_currentGraph.Initialize();

_currentGraph.HandleDialogueStarted();
Expand All @@ -76,7 +83,7 @@ public async UniTask PlayDialogue()

OnDialogueEnded?.Invoke(_currentGraph);

Debug.Log("dialogue completed");
Debug.Log($"{graph} dialogue completed");
}

public void AdvanceDialogue()
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
public class SubtitleSettings : ScriptableObject
{
public Color SubtitleColor = Color.black;
public int SubtitleFontSize = 24;
public int SubtitleFontSize = 25;
public bool DropShadow = false;

public bool EnableCharacterColor = true;
public bool ShowBackground;
public Color BackGroundColor = Color.white;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e66859f

Please sign in to comment.