public void TouchTask(string task) { switch (task) { case "Tap": GameObject colliderOpen = gc.GetObject(); if (colliderOpen != null) { string openName = colliderOpen.name; if (WindowSystem.Applist.Contains(openName) & WindowSystem.DynamicApplist.Contains(openName)) { GameObject layer = ls.GetLayer("DynamicLayer"); if (ws.CheckExist(openName)) { ws.PutDynamicWindowForward(layer, openName); } else { ws.insertDynamicWindow(layer, openName); } } if (WindowSystem.Applist.Contains(openName) & WindowSystem.StaticApplist.Contains(openName)) { GameObject layer = ls.GetLayer("StaticLayer"); if (ws.CheckExist(openName)) { ws.PutStaticWindowForward(layer, openName); } else { ws.insertStaticWindow(layer, openName); } } if (WindowSystem.SwitchShowList.ContainsKey(openName)) { ws.SwitchStatus(WindowSystem.SwitchShowList[openName]); } if (WindowSystem.SwitchHideList.ContainsKey(openName)) { ws.SwitchStatus(WindowSystem.SwitchHideList[openName]); } } break; case "Hold": GameObject colliderClose = gc.GetObject(); if (colliderClose != null) { string closeName = colliderClose.name; if (ws.CheckExist(closeName)) { Debug.Log("Closing " + closeName); ws.CloseWindow(closeName); } } break; default: break; } }
public void TouchTask(string task) { switch (task) { case "Tap": GameObject collider = gc.GetObject(); if (collider != null) { tapName = collider.name; parentName = collider.transform.parent.name; if (collider.tag == "Grid") { Debug.Log(tapName); Debug.Log(parentName); } //if (WindowSystem.Applist.Contains(tapName) & WindowSystem.DynamicApplist.Contains(tapName)) //{ // GameObject layer = ls.GetLayer("DynamicLayer"); // if (ws.CheckExist(tapName)) // { // ws.PutDynamicWindowForward(layer, tapName); // } // else // { // ws.insertDynamicWindow(layer, tapName); // } //} //if (WindowSystem.Applist.Contains(tapName) & WindowSystem.StaticApplist.Contains(tapName)) //{ // GameObject layer = ls.GetLayer("StaticLayer"); // if (ws.CheckExist(tapName)) // { // ws.PutStaticWindowForward(layer, tapName); // } // else // { // ws.insertStaticWindow(layer, tapName); // } //} //if (WindowSystem.SwitchShowList.ContainsKey(tapName)) //{ // ws.SwitchStatus(WindowSystem.SwitchShowList[tapName]); //} //if (WindowSystem.SwitchHideList.ContainsKey(tapName)) //{ // ws.SwitchStatus(WindowSystem.SwitchHideList[tapName]); //} } break; case "Hold": GameObject colliderClose = gc.GetObject(); if (colliderClose != null) { string closeName = colliderClose.name; //if (ws.CheckExist(closeName)) //{ // Debug.Log("Closing " + closeName); // ws.CloseWindow(closeName); //} } break; default: break; } }