// Start is called before the first frame update void Start() { uiController.setStartUIInvisible(); sender = GlobalController.Instance.client; GlobalController.Instance.curClientScene = LabScene.Entry_scene; updatedSceneToServer = false; if (GlobalController.Instance.getConnectionStatus()) { sender.prepareNewMessage4Server(MessageType.Scene); updatedSceneToServer = true; } curPhase = GlobalController.Instance.curEntryPhase; prevPhase = WelcomePhase.out_entry_scene; }
private void Awake() { if (Instance == null) { DontDestroyOnLoad(gameObject); Instance = this; curServerScene = LabScene.Entry_scene; curClientScene = LabScene.Entry_scene; curBlockid = trial_start_index; curEntryPhase = WelcomePhase.in_entry_scene; isUserLabInfoSet = false; } else if (Instance != null) { Destroy(gameObject); } }
private void Awake() { if (Instance == null) { DontDestroyOnLoad(gameObject); Instance = this; curClientScene = LabScene.Entry_scene; curEntryPhase = WelcomePhase.in_entry_scene; serverCmdQueue = new Queue <ServerCommand>(); isLabInfoSet = false; isConnecting = false; } else if (Instance != null) { Destroy(gameObject); } }
public void moveToNextBlock() { curBlockid++; switch (curLabInfos.labName) { case LabScene.Lab0_tap_5_5: curLab0BlockCondition = conLab0Blocks[curBlockid]; break; case LabScene.Lab1_tap_33_33: curLab1BlockCondition = conLab1Blocks[curBlockid]; break; } server.prepareNewMessage4Client(MessageType.Command, ServerCommand.server_say_exit_lab); curEntryPhase = WelcomePhase.check_client_scene; string entrySceneName = (LabScene.Entry_scene).ToString(); SceneManager.LoadScene(entrySceneName); }
private void switchPhase(WelcomePhase wp) { curPhase = wp; }
public void moveToPhase(WelcomePhase wp) { //GlobalController.Instance.curEntryPhase = wphase; switchPhase(wp); }