예제 #1
0
 public static GameUIComponent ToGameUIComponentEx(this GameObject go)
 {
     if (go)
     {
         GOGUI.ComParameter uel = go.GetComponent <GOGUI.ComParameter>();
         if (uel)
         {
             return(uel.parameter as GameUIComponent);
         }
         else
         {
             return(null);
         }
     }
     else
     {
         return(null);
     }
 }
예제 #2
0
 public static T ToGameUIComponentEx <T>(this GameObject go)
     where T : GameUIComponent
 {
     if (go)
     {
         GOGUI.ComParameter uel = go.GetComponent <GOGUI.ComParameter>();
         if (uel)
         {
             return(uel.parameter as T);
         }
         else
         {
             return(null);
         }
     }
     else
     {
         return(null);
     }
 }