26 lines
528 B
C#
26 lines
528 B
C#
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();
|
|
}
|
|
}
|
|
|
|
}
|
|
} |