36 lines
836 B
C#
36 lines
836 B
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace AlicizaX.AnimationFlow.Runtime {
|
|
[Category("Property")]
|
|
public class ButtonInteractable : ActionNode {
|
|
public Button target;
|
|
public bool interactable;
|
|
protected bool orgValue;
|
|
|
|
public override void OnInit() {
|
|
orgValue = target.interactable;
|
|
}
|
|
|
|
public override void OnReset() {
|
|
target.interactable = orgValue;
|
|
}
|
|
|
|
public override void OnEnter() {
|
|
target.interactable = interactable;
|
|
}
|
|
|
|
public override bool Valid() {
|
|
return target != null;
|
|
}
|
|
|
|
public override bool HasSubTitle() {
|
|
return true;
|
|
}
|
|
|
|
public override string SubTitle() {
|
|
return target != null ? target.name : null;
|
|
}
|
|
}
|
|
}
|