public static KernelController getInstance() { if (instance == null) { instance = new KernelController(); } return(instance); }
public static unsafe bool RegisterEventField(UIntPtr eventHandle, char *fieldName, UInt16 offset, UInt16 type) { return(KernelController.RegisterEventField(eventHandle, fieldName, offset, type)); }
public static unsafe bool RegisterEnumValue(UIntPtr eventHandle, char *valueName, UInt64 value, byte flagChar) { return(KernelController.RegisterEnumValue(eventHandle, valueName, value, flagChar)); }
public static unsafe UIntPtr GetNextEntry(UIntPtr queryHandle, UIntPtr *type, UInt32 *userOffset, byte *buffer, UInt16 bufferSize) { return(KernelController.GetNextEntryImpl(queryHandle, type, userOffset, buffer, bufferSize)); }
public static unsafe UIntPtr LogSourceEntry(UIntPtr sourceHandle, uint flags, UIntPtr eventType, byte *buffer, int size) { return(KernelController.LogSourceEntryImpl(sourceHandle, flags, eventType, buffer, size)); }
public static unsafe bool RegisterEventGenericField(UIntPtr eventHandle, char *fieldName, UInt16 offset, UInt16 size, UIntPtr fieldTypeHandle) { return(KernelController.RegisterEventGenericField(eventHandle, fieldName, offset, size, fieldTypeHandle)); }
public static unsafe bool GetSourceInformation(UIntPtr sourceHandle, UIntPtr *storageHandle, UIntPtr *eventType, UInt16 *count, char *bufferName, UInt16 bufferSize) { return(KernelController.GetSourceInformation(sourceHandle, storageHandle, eventType, count, bufferName, bufferSize)); }
public static unsafe UIntPtr WalkEventDescriptor(UIntPtr eventHandle, UIntPtr currentField, UInt16 *offset, UInt16 *type, char *bufferName, UInt16 bufferSize) { return(KernelController.WalkEventDescriptor(eventHandle, currentField, offset, type, bufferName, bufferSize)); }
public static unsafe bool RegisterEnum(char *enumName, UInt16 type, UIntPtr *eventHandle) { return(KernelController.RegisterEnum(enumName, type, eventHandle)); }
public static UIntPtr OpenGlobalStorage(UIntPtr storageHandle) { return(KernelController.OpenStorageImpl(storageHandle)); }
public static bool TestKernelStorage() { return(KernelController.TestKernelStorageImpl()); }
public static bool DebugPrintLogEntry(UIntPtr controllerHandle, UIntPtr entryHandle) { return(KernelController.DebugPrintLogEntry( controllerHandle, entryHandle)); }
public static unsafe int QueryEventTypeList(UIntPtr *buffer, int size) { return(KernelController.QueryEventTypeList(buffer, size)); }
public static UIntPtr CreateQueryView(UIntPtr storageHandle, bool forward) { return(KernelController.CreateQueryViewImpl(storageHandle, forward)); }
// Use this for initialization void Start() { try { DataManager.dataInstance = GameObject.Find("Loading").GetComponent<DataManager>(); if (panels.Length == 0) { panels = DataManager.dataInstance.panels.ToArray(); } else//パネル保存 { foreach (GameObject panel in panels) { bool exist = false; foreach (GameObject dataP in DataManager.dataInstance.panels) { if (dataP == panel) { exist = true; break; } } if (!exist) { DataManager.dataInstance.panels.Add(panel); } } } } catch { } g = GameObject.Find("ObjectExpectation"); foreach(GameObject k in GameObject.FindGameObjectsWithTag("Kernel")) { if(k.GetComponent<KernelController>().mikata) { kerCon = k.GetComponent<KernelController>(); break; } } terCon = GameObject.Find("Territory").GetComponent<TerritoryController>(); camera = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<Camera>(); #region 各コマンド初期化 Transform robotList = transform.FindChild("RobotList"); GameObject bt; EventTrigger trigger; EventTrigger.Entry entryDown, entryDrag, entryEndDrag; br = new List<Button>();//ロボコマンド初期化 GameObject[] robots = kerCon.genRobots; for (int i = 0; i < robots.GetLength(0); i++) { bt = (GameObject)Instantiate(Resources.Load("Prefabs/RoboButton"), transform.position, transform.rotation);//新たなロボボタン br.Add(bt.GetComponent<Button>()); br[i].transform.SetParent(robotList, true); br[i].transform.localPosition = new Vector2(-400 + 160 * (i % 5), 0); br[i].transform.localScale = Vector3.one; RobotController r = robots[i].GetComponent<RobotController>(); int SIZE = 32; Color[] c; Sprite iconSprite; if (r.is3d) { iconSprite = r.image_all; } else { Texture2D image = new Texture2D(SIZE, SIZE, TextureFormat.ARGB32, false); c = robots[i].GetComponent<SpriteRenderer>().sprite.texture.GetPixels( SIZE * (1 + (r.im_num % 4) * 3), SIZE * (7 - 4 * (r.im_num / 4) - r.dire), SIZE, SIZE); image.SetPixels(0, 0, SIZE, SIZE, c); image.Apply(); iconSprite = Sprite.Create(image, new Rect(0, 0, SIZE, SIZE), new Vector2(0.5f, 0.5f), SIZE); } br[i].GetComponent<Image>().sprite = iconSprite; br[i].transform.FindChild("Text").gameObject.SetActive(false); //br[i].onClick.AddListener(() => SetNumber(i, true, 0)); trigger = br[i].GetComponent<EventTrigger>(); entryDown = new EventTrigger.Entry(); entryDown.eventID = EventTriggerType.PointerDown; int genNo = i; entryDown.callback.AddListener((x) => SetNumber(genNo, true, 0, genNo)); trigger.triggers.Add(entryDown); } Transform panelList = transform.FindChild("PanelList"); bp = new List<Button>();//パネルコマンド初期化 int panelCount = 0; for (int i = 0; i < panels.GetLength(0); i++) { int generateCount = 1; if (panels[i].GetComponent<PanelController>().turnable)//回転可能ならば、その分だけボタンを生成 { generateCount = 4; } for (int j = 0; j < generateCount; j++) { bt = (GameObject)Instantiate(Resources.Load("Prefabs/PanButton"), transform.position, Quaternion.Euler(0, 0, 90 * j));//新たなパネルボタン bp.Add(bt.GetComponent<Button>()); bp[panelCount].transform.SetParent(panelList, true); bp[panelCount].GetComponent<RectTransform>().anchoredPosition = new Vector2(0, -100 - 160 * i); bp[panelCount].transform.localScale = panels[i].transform.FindChild("Icon").localScale; bp[panelCount].transform.localEulerAngles = panels[i].transform.FindChild("Icon").localEulerAngles; bp[panelCount].GetComponent<Image>().sprite = panels[i].transform.FindChild("Icon").GetComponent<SpriteRenderer>().sprite; bp[panelCount].transform.FindChild("Text").gameObject.SetActive(false); //bp[panelCount].onClick.AddListener(() => SetNumber(i, false, j)); trigger = bp[panelCount].GetComponent<EventTrigger>(); entryDown = new EventTrigger.Entry(); entryDown.eventID = EventTriggerType.PointerDown; int genNo = i, dire = j, panelNo = panelCount; entryDown.callback.AddListener((x) => SetNumber(genNo, false, dire, panelNo)); entryDown.callback.AddListener((x) => TouchDownScreen()); entryDrag= new EventTrigger.Entry(); entryDrag.eventID = EventTriggerType.Drag; entryDrag.callback.AddListener((x) => TouchingPanelList()); trigger.triggers.Add(entryDown); trigger.triggers.Add(entryDrag); panelCount++; } } #endregion settedPanels = new GameObject[panels.Length]; setDire.SetActive(false); //ChangeTab(); //OnMenu(); LimitScroll(mapSizeX, mapSizeY, false); cautionCursors = new List<GameObject>(); comboCount = 0; comboCountMax = 0; comboWaitCount = 0; gettedItems = new bool[items.Length]; SetCombo(); SetGetItem(); }
public static void DeleteQueryView(UIntPtr storageHandle) { KernelController.DeleteQueryViewImpl(storageHandle); }
public static unsafe bool RegisterEvent(char *eventName, char *eventDescription, UIntPtr *eventHandle) { return(KernelController.RegisterEvent(eventName, eventDescription, eventHandle)); }