예제 #1
0
 // Add / Remove UILock component
 public static void Lock(GameObject go, string flag, bool bLock)
 {
     if (bLock)
     {
         bool bAlreadyLockBy = IsLockBy(go, flag);
         if (!bAlreadyLockBy)
         {
             // Add Component
             UILocker uilock = go.AddComponent <UILocker>();
             uilock.m_flag = flag;
         }
     }
     else
     {
         UILocker[] uilocks = go.GetComponents <UILocker>();
         foreach (UILocker uilock in uilocks)
         {
             if (uilock.m_flag == flag)
             {
                 // Remove component
                 Destroy(uilock);
             }
         }
     }
 }
예제 #2
0
 public static void UIBlockSystemLock(GameObject go, bool isLock = true)
 {
     if (go != null)
     {
         UILocker.LockRecursive(go, "UISystem Block System", isLock);
     }
 }
예제 #3
0
 void Unlock()
 {
     UILocker.LockRecursive(gameObject, name + ".QucikShelf", false);
 }
예제 #4
0
 void Lock()
 {
     UILocker.LockRecursive(gameObject, name + ".QucikShelf", true);
 }