-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from Studio-23-xyz/dev
Make base eventnode type and fix event firing
- Loading branch information
Showing
13 changed files
with
95 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 6 additions & 11 deletions
17
Assets/Packages/com.studio23.ss2.dialoguesystem/Runtime/Data/xNode/Node/EventNode.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,19 @@ | ||
using UnityEngine; | ||
using UnityEngine.Events; | ||
using UnityEngine.Serialization; | ||
using XNode; | ||
|
||
namespace Studio23.SS2.DialogueSystem.Data | ||
{ | ||
[NodeTint(200,50,50), NodeWidth(500)] | ||
public class EventNode : DialogueGraphNodeBase | ||
[NodeTint(200,50,50), NodeWidth(500), CreateNodeMenu("Unity Event Node")] | ||
public class EventNode : EventNodeBase | ||
{ | ||
[Input] | ||
public int Entry; | ||
public UnityEvent Event; | ||
|
||
[SerializeField] UnityEvent Event; | ||
|
||
public void Invoke() | ||
public override void Invoke() | ||
{ | ||
Event.Invoke(); | ||
} | ||
public override void Initialize() | ||
{ | ||
//do nothing | ||
} | ||
|
||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
Assets/Packages/com.studio23.ss2.dialoguesystem/Runtime/Data/xNode/Node/EventNodeBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
namespace Studio23.SS2.DialogueSystem.Data | ||
{ | ||
public abstract class EventNodeBase : DialogueGraphNodeBase | ||
{ | ||
[Input] | ||
public int Entry; | ||
|
||
public abstract void Invoke(); | ||
|
||
public override void Initialize() | ||
{ | ||
//do nothing | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
...ts/Packages/com.studio23.ss2.dialoguesystem/Runtime/Data/xNode/Node/EventNodeBase.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
...udio23.ss2.dialoguesystem/Samples/DialogueChoiceDemo/Configuration/SubtitleSettings.asset
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!114 &11400000 | ||
MonoBehaviour: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_GameObject: {fileID: 0} | ||
m_Enabled: 1 | ||
m_EditorHideFlags: 0 | ||
m_Script: {fileID: 11500000, guid: 846559197231ca24c8ee20e824e62423, type: 3} | ||
m_Name: SubtitleSettings | ||
m_EditorClassIdentifier: | ||
SubtitleColor: {r: 0, g: 0, b: 0, a: 1} | ||
SubtitleFontSize: 25 | ||
DropShadow: 0 | ||
EnableCharacterColor: 1 | ||
ShowBackground: 0 | ||
BackGroundColor: {r: 1, g: 1, b: 1, a: 1} |
8 changes: 8 additions & 0 deletions
8
...3.ss2.dialoguesystem/Samples/DialogueChoiceDemo/Configuration/SubtitleSettings.asset.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters