Exemple #1
0
 void Start()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
Exemple #2
0
 void Update()
 {
     if (numberPadState == true)
     {
         numberPadState = false;
         commonLang     = CommonLang.instance;
         gameObject.transform.DOLocalMoveY(0.0f, 0.3f).OnComplete(EventSystemEnable);
     }
 }
    void Start()
    {
        CommonUtil.ScreenSettingsPortrait();
        //numberPad.SetActive(false);

#if UNITY_ANDROID
        qrScannerButton.SetActive(true);
#elif UNITY_IOS
        qrScannerButton.SetActive(false);
#endif
        clientController = UXClientController.Instance;

        commonLang = CommonLang.instance;
        //Debug.Log (commonLang.langList.Count);
        noti.text = commonLang.langList[1];

        clientController.OnConnected     += OnConnected;
        clientController.OnConnectFailed += OnConnectFailed;

        clientController.OnJoinSucceeded += OnJoinSucceeded;
        clientController.OnJoinFailed    += OnJoinFailed;
        clientController.OnDisconnected  += OnDisconnected;

        if (clientController.IsConnected() == false)
        {
            serverConnect.SetActive(true);
            clientController.Connect();
        }

        if (string.IsNullOrEmpty(qrString) == false)
        {
            UXConnectController.SetRoomNumber(int.Parse(qrString));
            clientController.Join("com.cspmedia.runandsteal");
        }

        if (latest_errCode != -1)
        {
            OnJoinFailed(latest_errCode);
            isCon          = true;
            latest_errCode = -1;
        }
    }
Exemple #4
0
 // Use this for initialization
 void Start()
 {
     CommonUtil.ScreenSettingsPortrait();
     commonLang       = CommonLang.instance;
     clientController = UXClientController.Instance;
 }