private bool scheduleBlocks() { if (curLabInfos.labName == LabScene.Lab0_tap_5_5) { conLab0Blocks = new lab0Factors.BlockCondition[curLabInfos.totalBlockCount + 1]; // set variable: seqBlock seqBlocks.setBlockLength(LabScene.Lab0_tap_5_5); seqBlocks.setAllSequence(userid); // set variable: conBlock for (int blockid = block_start_index; blockid <= curLabInfos.totalBlockCount; blockid++) { int pid = (int)seqBlocks.seqPosture[blockid - 1]; int aid = (int)seqBlocks.seqAngle[blockid - 1]; int sid = (int)seqBlocks.seqShape[blockid - 1]; int oid = (int)seqBlocks.seqOrientation[blockid - 1]; conLab0Blocks[blockid] = new lab0Factors.BlockCondition(blockid, pid, aid, sid, oid); } curLab0BlockCondition = conLab0Blocks[curBlockid]; return(true); } else if (curLabInfos.labName == LabScene.Lab1_tap_33_33) { conLab1Blocks = new lab1Factors.BlockCondition[curLabInfos.totalBlockCount + 1]; // set variable: seqBlock seqBlocks.setBlockLength(LabScene.Lab1_tap_33_33); seqBlocks.setAllSequence(userid); // set variable: conBlock for (int blockid = block_start_index; blockid <= curLabInfos.totalBlockCount; blockid++) { int pid = (int)seqBlocks.seqPosture[blockid - 1]; int aid = (int)seqBlocks.seqAngle[blockid - 1]; int sid = (int)seqBlocks.seqShape[blockid - 1]; int oid = (int)seqBlocks.seqOrientation[blockid - 1]; conLab1Blocks[blockid] = new lab1Factors.BlockCondition(blockid, pid, aid, sid, oid); } curLab1BlockCondition = conLab1Blocks[curBlockid]; return(true); } return(false); }
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); }