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()
        {
            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;
        }