35 lines
802 B
C#
35 lines
802 B
C#
using UnityEngine;
|
|
|
|
namespace AlicizaX.AnimationFlow.Runtime {
|
|
[Category("Property")]
|
|
public class GameObjectActive : ActionNode {
|
|
public GameObject target;
|
|
public bool active;
|
|
protected bool orgValue;
|
|
|
|
public override void OnInit() {
|
|
orgValue = target.activeSelf;
|
|
}
|
|
|
|
public override void OnReset() {
|
|
target.SetActive(orgValue);
|
|
}
|
|
|
|
public override void OnEnter() {
|
|
target.SetActive(active);
|
|
}
|
|
|
|
public override bool Valid() {
|
|
return target != null;
|
|
}
|
|
|
|
public override bool HasSubTitle() {
|
|
return true;
|
|
}
|
|
|
|
public override string SubTitle() {
|
|
return target != null ? target.name : null;
|
|
}
|
|
}
|
|
}
|