예제 #1
0
    // 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;
    }
예제 #2
0
 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);
     }
 }
예제 #3
0
 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);
     }
 }
예제 #4
0
    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);
    }
예제 #5
0
 private void switchPhase(WelcomePhase wp)
 {
     curPhase = wp;
 }
예제 #6
0
 public void moveToPhase(WelcomePhase wp)
 {
     
     //GlobalController.Instance.curEntryPhase = wphase;
     switchPhase(wp);
 }