添加对话框事件以及对话持久化文件
This commit is contained in:
12
Assets/Scripts/Event/EventArgs/DialogPopArgs.cs
Normal file
12
Assets/Scripts/Event/EventArgs/DialogPopArgs.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace Event.EventArgs
|
||||
{
|
||||
public class DialogPopArgs : System.EventArgs
|
||||
{
|
||||
public int Index { get; private set; }
|
||||
|
||||
public DialogPopArgs(int index)
|
||||
{
|
||||
Index = index;
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Event/EventArgs/DialogPopArgs.cs.meta
Normal file
3
Assets/Scripts/Event/EventArgs/DialogPopArgs.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 29958321a8bd415ab793cc37deb6a859
|
||||
timeCreated: 1726033413
|
||||
6
Assets/Scripts/Event/EventHandler/DialogPopHandler.cs
Normal file
6
Assets/Scripts/Event/EventHandler/DialogPopHandler.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
using Event.EventArgs;
|
||||
|
||||
namespace Event.EventHandler
|
||||
{
|
||||
public delegate void DialogPopHandler(DialogPopArgs e);
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4803bc41d6fa4ae884b015a21124459e
|
||||
timeCreated: 1726033554
|
||||
@@ -33,10 +33,16 @@ namespace Event
|
||||
}
|
||||
|
||||
public event CameraInterActHandler CameraInterAct;
|
||||
public event DialogPopHandler DialogPop;
|
||||
|
||||
public void OnCameraInterAct(GameObject item)
|
||||
{
|
||||
CameraInterAct?.Invoke(new CameraInterActArgs(item));
|
||||
}
|
||||
|
||||
public void OnDialogPop(int index)
|
||||
{
|
||||
DialogPop?.Invoke(new DialogPopArgs(index));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user