예제 #1
0
    public static ButtonColorChange RegisterInstance(GameObject obj)
    {
        ButtonColorChange btnclrChange = obj.GetComponent <ButtonColorChange> ();

        if (btnclrChange == null)
        {
            btnclrChange = obj.AddComponent <ButtonColorChange>();
        }
        return(btnclrChange);
    }
예제 #2
0
 public void changeCheckedObject(GameObject obj)
 {
     if (obj != objNowObject)
     {
         if (objNowObject != null)
         {
             foreach (GameObject objChild in ButtonRootDelegate.RegisterBtnDelegate(objNowObject).list_ObjectList)
             {
                 ButtonColorChange.RegisterInstance(objChild).setIsChecked(false);
                 ButtonColorChange.RegisterInstance(objChild).change();
             }
             objNowObject = obj;
         }
         else
         {
             objNowObject = obj;
         }
     }
 }