[Serializable] publicclassSFAction_Condition { [AllowNesting] [Label("条件类型")] [OnValueChanged("ResetCondition")] public SFAction_ConditionType cType;
public SFAction_ConditionType CType { set { if (value != cType) { cType = value; ResetCondition(); } } }
public ActionConditionBase condition;
public Type GetConditionType() { if (cType == SFAction_ConditionType.KeyCode) { returntypeof(KeyCodeChecker); } elsereturntypeof(ActionConditionBase); }
publicvoidResetCondition() { Debug.LogError("跳转"); if (cType == SFAction_ConditionType.KeyCode) { condition = new KeyCodeChecker(); } } } }