// Start is called before the first frame update
    void Start()
    {
        chatMsgInputField = GameObject.Find("ChatMsgInputField").GetComponent <InputField>();
        chattingLog       = GameObject.Find("ChattingLog").GetComponent <Text>();
        chattingLog.text  = "";

        roomLeaveResPkt = new RoomLeaveResPacket();
        roomLeaveNtfPkt = new RoomLeaveNtfPacket();

        errorMsgBox = gameObject.AddComponent <ErrorMsgBox>();
        if (errorMsgBox != null)
        {
            errorMsgBox.Init();
        }
        else
        {
            Debug.LogWarning("errorMsgBox is null");
        }


        Debug.Log("start Game Scene");
        isLocalUserInfoNeedUpdate = true;

        UI_IsReadyLocalPlayer(false);
        UI_IsReadyRemotePlayer(false);

        isGameStart = false;
    }
Esempio n. 2
0
    // Start is called before the first frame update
    void Start()
    {
        Screen.SetResolution(1366, 768, false);
        gameServer  = GameNetworkServer.Instance;
        errorMsgBox = gameObject.AddComponent <ErrorMsgBox>();

        (GameObject.Find("input_ip_addr_field")).GetComponent <InputField>().text         = "52.141.58.88";
        (GameObject.Find("input_ip_addr_field")).GetComponent <InputField>().interactable = false;

        GameObject.Find("sign_up_btn").GetComponent <Button>().interactable = false;

        if (errorMsgBox != null)
        {
            Debug.Log("errorMsgBox Init");
            errorMsgBox.Init();
        }
        else
        {
            Debug.LogWarning("errorMsgBox is null");
        }
    }
    // Start is called before the first frame update
    void Start()
    {
        gameServer  = GameNetworkServer.Instance;
        errorMsgBox = gameObject.AddComponent <ErrorMsgBox>();
        Text userIDText = GameObject.Find("id_txt").GetComponent <Text>();

        roomEnterRes         = new RoomEnterResPacket();
        roomEnterRes.Result  = ERROR_CODE.DUMMY_CODE;
        userIDText.text      = GameNetworkServer.Instance.LocalUserID;
        isWatingEnterRoomRes = false;

        if (errorMsgBox != null)
        {
            errorMsgBox.Init();
        }
        else
        {
            Debug.LogWarning("errorMsgBox is null");
        }

        Debug.Log("start Lobby Scene");
    }