public override void OnEnter(params object[] onEnterParams)
    {
        base.OnEnter(onEnterParams);


        m_btnConnectA.AddClickCallback(OnBtnConnectAClick);
        m_btnDisconnect.AddClickCallback(OnBtnDisconnectClick);
        m_btnBLE_1.AddClickCallback(OnBtnBLE1ConnectClick);
        m_btnBLE_2.AddClickCallback(OnBtnBLE2ConnectClick);
    }
Beispiel #2
0
    public override void OnEnter(params object[] onEnterParams)
    {
        base.OnEnter(onEnterParams);

        m_btnStartup.AddClickCallback(OnBtnStartUpClick);
        m_btnStop.AddClickCallback(OnBtnStopClick);

        m_btnGear1.AddClickCallback(OnSetGear1Click);
        m_btnGear2.AddClickCallback(OnSetGear2Click);
        m_btnGear3.AddClickCallback(OnSetGear3Click);
        m_btnGear4.AddClickCallback(OnSetGear4Click);

        MessageHandler.RegisterMessageHandler((int)MessageDefine.E_D2C_MOTOR_SPEED, OnGetMotorGearResponse);
        BluetoothEvents.OnVolumeKeyEvent += OnVolumeKeyEventHandler;
    }
Beispiel #3
0
    public override void OnEnter(params object[] onEnterParams)
    {
        base.OnEnter(onEnterParams);

        m_btnEnterProgramming.AddClickCallback(OnBtnEnterProgrammingClick);
        m_btnDown.AddClickCallback(OnBtnDownClick);
        m_btnUp.AddClickCallback(OnBtnUpClick);
        m_btnPowerOff.AddClickCallback(OnBtnPowerOffClick);
        m_btnRefreshBattery.AddClickCallback(OnBtnRefreshBatteryClick);

        m_brakeTimeSettingComponent.AddOnSliderDragEndCallback(OnBrakeTimeSettingFinishCallback);
        m_maxAccelerationSettingComponent.AddOnSliderDragEndCallback(OnAcceleratorSettingFinishCallback);
        //m_gearSettingComponent.AddOnSliderDragEndCallback(OnGearCountSettingFinishCallback);

        for (int i = 0; i < m_gearAccelerationSettingComponents.Count; ++i)
        {
            m_gearAccelerationSettingComponents[i].SetActive(true);
            m_gearAccelerationSettingComponents[i].CustomData = i + 1;
            m_gearAccelerationSettingComponents[i].SetValue(LocalStorage.GetFloat((LocalSetting)(i + 1)));
            m_gearAccelerationSettingComponents[i].AddOnSliderDragEndCallback(OnSettingGearAcceleratorCallback);
        }
    }