public void ValueChanged(ExtraToggle toggle, bool isOn) { if (onToggleValueChanged != null) { onToggleValueChanged(toggle, isOn); } }
public void UnregisterToggle(ExtraToggle toggle) { //base.RegisterToggle(toggle);//原方法无效的 if (toggle) { toggle.RemoveGroupCallback(); toggles.Remove(toggle); } }
public void RegisterToggle(ExtraToggle toggle) { if (toggle == null) { return; } //base.RegisterToggle(toggle);//原方法无效的 toggle.InitGroupCallback(this); toggles.Add(toggle); }
void OnEnable() { m_target = target as ExtraToggle; }