public bool DOAwake() { if (LLSystem.isInit == false) { LLUtils.LoadScene(0); return(false); } foreach (var v in toActiveAtStart) { if (v != null) { v.SetActive(true); } } foreach (var v in toDisableAtStart) { if (v != null) { v.SetActive(false); } } settingValues.UpdateValuesByCSV(false); return(true); }
private void Awake() { if (LLSystem.instance != null) { Destroy(gameObject); return; } instance = this; DontDestroyOnLoad(gameObject); LLUtils.LoadScene(1); }
private void Update() { if (!DEBUG_KEY_ACTIVE) { return; } if (Input.GetKeyDown(DebugDisplayKey)) { DEBUG_DISPLAY = !DEBUG_DISPLAY; } else if (Input.GetKeyDown(DebugRestartScene)) { LLUtils.ReloadCurrentScene(); } }
void ReadSerial(SerialPort serial) { if (serial.IsOpen) { msg = ""; cardID = ""; captorID = ""; try { msg = serial.ReadLine(); serial.BaseStream.Flush(); serial.DiscardInBuffer(); cardID = msg.Substring(0, msg.Length - 1); captorID = msg.Substring(msg.Length - 1); if (msg.Contains("88048C1A")) { LLUtils.ReloadCurrentScene(); return; } switch (serial.PortName) { case "COM4": if (msg.Length == 9) { if (captorID == "1") { // Line Middle P0 GameManager.instance.ReadCardNFC_GameBoard(cardID, 0, 2); } else if (captorID == "0") { // Line Right P0 GameManager.instance.ReadCardNFC_GameBoard(cardID, 0, 1); } else if (captorID == "3") { // Line Left P0 GameManager.instance.ReadCardNFC_GameBoard(cardID, 0, 0); } } if (captorID == "2") { // Evolution P0 GameManager.instance.ReadCardNFC_Training(cardID, 0); } break; case "COM3": if (msg.Length == 9) { if (captorID == "0") { // Line Right P1 GameManager.instance.ReadCardNFC_GameBoard(cardID, 1, 2); } else if (captorID == "1") { // Line Middle P1 GameManager.instance.ReadCardNFC_GameBoard(cardID, 1, 1); } else if (captorID == "2") { // Line Left P1 GameManager.instance.ReadCardNFC_GameBoard(cardID, 1, 0); } } if (captorID == "3") { // Evolution P1 GameManager.instance.ReadCardNFC_Training(cardID, 1); } break; } } catch (System.Exception) { } } }
public virtual void ReloadLevel() { LLUtils.ReloadCurrentScene(); }