添加对话框事件以及对话持久化文件

This commit is contained in:
2024-09-11 14:07:23 +08:00
parent 8162e2fe30
commit 8bea97f5ae
12 changed files with 94 additions and 4 deletions

View 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;
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 29958321a8bd415ab793cc37deb6a859
timeCreated: 1726033413

View File

@@ -0,0 +1,6 @@
using Event.EventArgs;
namespace Event.EventHandler
{
public delegate void DialogPopHandler(DialogPopArgs e);
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 4803bc41d6fa4ae884b015a21124459e
timeCreated: 1726033554

View File

@@ -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));
}
}
}