(client) feat:窗口新增独占、占用输入属性,添加部分行为树节点和工作类
This commit is contained in:
26
Client/Assets/Scripts/UI/EntityPlacementUI.cs
Normal file
26
Client/Assets/Scripts/UI/EntityPlacementUI.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using Base;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
|
||||
namespace UI
|
||||
{
|
||||
public class EntityPlacementUI:UIBase,ITickUI
|
||||
{
|
||||
public UnityAction currentAction = null;
|
||||
public void TickUI()
|
||||
{
|
||||
if (!IsVisible||currentAction==null)
|
||||
return;
|
||||
if (Input.GetMouseButton(0))
|
||||
{
|
||||
currentAction.Invoke();
|
||||
}
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.Escape))
|
||||
{
|
||||
Hide();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user