feat(GazeReminder): 实现更多提示
This commit is contained in:
@@ -11,10 +11,10 @@ namespace Script.Gameplay.Facility
|
||||
[SerializeField] protected bool isEnableInteract = true;
|
||||
[SerializeField] protected bool isEnableEdit = true;
|
||||
[SerializeField] protected bool isEnableConnect = true;
|
||||
[SerializeField] protected string componentName;
|
||||
[SerializeField] protected int needSignalCount = 1;
|
||||
[SerializeField] protected bool isOpenInEditor = true;
|
||||
protected int CurrentSignalCount = 0;
|
||||
[SerializeField] protected int needSignalCount = 1;
|
||||
[SerializeField] protected int currentSignalCount = 0;
|
||||
[SerializeField] protected string componentName;
|
||||
|
||||
public virtual bool IsEnableInteract
|
||||
{
|
||||
@@ -44,6 +44,17 @@ namespace Script.Gameplay.Facility
|
||||
get => isEnableConnect;
|
||||
set => isEnableConnect = value;
|
||||
}
|
||||
public virtual int NeedSignalCount
|
||||
{
|
||||
get => needSignalCount;
|
||||
set => needSignalCount = value;
|
||||
}
|
||||
|
||||
public virtual int CurrentNeedSignalCount
|
||||
{
|
||||
get => currentSignalCount;
|
||||
set => currentSignalCount = value;
|
||||
}
|
||||
|
||||
public string ComponentName
|
||||
{
|
||||
@@ -96,14 +107,14 @@ namespace Script.Gameplay.Facility
|
||||
{
|
||||
if (active)
|
||||
{
|
||||
CurrentSignalCount++;
|
||||
CurrentNeedSignalCount++;
|
||||
}
|
||||
else
|
||||
{
|
||||
CurrentSignalCount = Mathf.Max(0, CurrentSignalCount - 1);
|
||||
CurrentNeedSignalCount = Mathf.Max(0, CurrentNeedSignalCount- 1);
|
||||
}
|
||||
|
||||
if (CurrentSignalCount < needSignalCount)
|
||||
if (CurrentNeedSignalCount < NeedSignalCount)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ namespace Script.Gameplay.Facility
|
||||
|
||||
public override void OnSignalReceived(bool active, GameObject sender)
|
||||
{
|
||||
base.OnSignalReceived(active, sender);
|
||||
Interact(sender);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user