예제 #1
0
 public override void SetTarget(GameObject target)
 {
     base.SetTarget(target);
     if ((Object)target == (Object)null)
     {
         Debug.LogError("The target object provided was null");
     }
     else
     {
         this.target = target.GetComponent <ICheckboxControl>();
         if (this.target == null)
         {
             this.target = target.GetSMI <ICheckboxControl>();
         }
         if (this.target == null)
         {
             Debug.LogError("The target provided does not have an ICheckboxControl component");
         }
         else
         {
             label.text = this.target.CheckboxLabel;
             toggle.transform.parent.GetComponent <ToolTip>().SetSimpleTooltip(this.target.CheckboxTooltip);
             titleKey                = this.target.CheckboxTitleKey;
             toggle.isOn             = this.target.GetCheckboxValue();
             toggleCheckMark.enabled = toggle.isOn;
         }
     }
 }
예제 #2
0
 public override void ClearTarget()
 {
     base.ClearTarget();
     target = null;
 }