您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
20 行
593 B
20 行
593 B
using UnityEngine.Events;
|
|
using UnityEngine;
|
|
|
|
/// <summary>
|
|
/// This class is used for Events to toggle the interaction UI.
|
|
/// Example: Dispaly or hide the interaction UI via a bool and the interaction type from the enum via int
|
|
/// </summary>
|
|
|
|
[CreateAssetMenu(menuName = "Events/Toogle Interaction UI Event Channel")]
|
|
public class InteractionUIEventChannelSO : ScriptableObject
|
|
{
|
|
public UnityAction<bool, Interaction> OnEventRaised;
|
|
public void RaiseEvent(bool state, Interaction interactionType)
|
|
{
|
|
if (OnEventRaised != null)
|
|
OnEventRaised.Invoke(state, interactionType);
|
|
}
|
|
|
|
}
|
|
|