Exemplo n.º 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);
             }
         }
     }
 }
Exemplo n.º 2
0
 public static void UIBlockSystemLock(GameObject go, bool isLock = true)
 {
     if (go != null)
     {
         UILocker.LockRecursive(go, "UISystem Block System", isLock);
     }
 }
Exemplo n.º 3
0
 void Unlock()
 {
     UILocker.LockRecursive(gameObject, name + ".QucikShelf", false);
 }
Exemplo n.º 4
0
 void Lock()
 {
     UILocker.LockRecursive(gameObject, name + ".QucikShelf", true);
 }