コード例 #1
0
        public override void Init()
        {
            base.Init();
            view = UINode as MainuiView;

            userInfoDataStore = DataStoreManager.Instance.FindOrBindDataStore <UserInfoDataStore>();
            userInfoDataStore.RegisterSubscriber(this);

            view.modeBtn.onClick.AddListener(OnClickModeButton);
            view.headFrameBtn.onClick.AddListener(OnClickHeadFrame);
        }
コード例 #2
0
        public override void Init()
        {
            Instance = this;

            userInfoDataStore = DataStoreManager.Instance.FindOrBindDataStore <UserInfoDataStore>();
            GlobalEventSystem.Instance.Bind(EventId.onConnectNetwork, OnConnectNetwork);

            NetworkSystem.Instance.RegisterNetworkEvent(Common.CSUserLoginRes, OnCSUserLoginRes);
            NetworkSystem.Instance.RegisterNetworkEvent(Common.CSUserRegisterRes, OnCSUserRegisterRes);
            NetworkSystem.Instance.RegisterNetworkEvent(Common.CSCreatePlayerRes, OnCSCreatePlayerRes);
            NetworkSystem.Instance.RegisterNetworkEvent(Common.CSPlayerLoginRes, OnCSPlayerLoginRes);
        }
コード例 #3
0
        public override void Init()
        {
            base.Init();

            view = UINode as LoginView;

            view.rememberPasswordToggle.onValueChanged.AddListener(OnRememberPasswordToggleChanged);
            view.loginBtn.onClick.AddListener(OnClickLogin);
            view.goRegisterBtn.onClick.AddListener(OnClickGoRegister);
            view.registerBtn.onClick.AddListener(OnClickRegister);
            view.goLoginBtn.onClick.AddListener(OnClickGoLogin);
            view.createPlayerBtn.onClick.AddListener(OnClickCreatePlayer);
            view.headFrameButton.onClick.AddListener(OnClickHeadFrame);
            view.offlineButton.onClick.AddListener(OnClickOffline);

            userInfoDataStore = DataStoreManager.Instance.FindOrBindDataStore <UserInfoDataStore>();
            userInfoDataStore.RegisterSubscriber(this);

            GlobalEventSystem.Instance.Bind(EventId.onClickKeyboardEnter, OnClickKeyboardEnter);

            isLoginMode = true;
        }