浏览代码

Added dialogue event type

/main
Amel 4 年前
当前提交
7b9aca97
共有 2 个文件被更改,包括 30 次插入0 次删除
  1. 19
      UOP1_Project/Assets/Scripts/Events/ScriptableObjects/DialogueEventChannelSo.cs
  2. 11
      UOP1_Project/Assets/Scripts/Events/ScriptableObjects/DialogueEventChannelSo.cs.meta

19
UOP1_Project/Assets/Scripts/Events/ScriptableObjects/DialogueEventChannelSo.cs


using UnityEngine.Events;
using UnityEngine;
/// <summary>
/// This class is used for talk interaction events.
/// Example: start talking to an actor passed as paramater
/// </summary>
[CreateAssetMenu(menuName = "Events/Dialogue Event Channel")]
public class DialogueEventChannelSo : ScriptableObject
{
public UnityAction<ActorSO> OnEventRaised;
public void RaiseEvent(ActorSO actor)
{
if (OnEventRaised != null)
OnEventRaised.Invoke(actor);
}
}

11
UOP1_Project/Assets/Scripts/Events/ScriptableObjects/DialogueEventChannelSo.cs.meta


fileFormatVersion: 2
guid: 72b8faf3c652eb74786b6fd69e28e7f3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存