コード例 #1
0
ファイル: NFModelInput.cs プロジェクト: tzw28/NFUnitySDK
    public void FixedUpdate()
    {
        if (mJoystick == null)
        {
            mJoystick = mUIModule.GetUI <NFUIJoystick>();

            if (mJoystick)
            {
                mJoystick.SetKeyPressViewSyncHandler(JoyOnKeyPressViewSyncHandler);
                mJoystick.SetKeyPressModelLoadHandler(JoyOnKeyPressModelLoadHandler);
                mJoystick.SetKeyPressModelSwitchHandler(JoyOnKeyPressModelSwitchHandler);
                mJoystick.SetKeyPressGetModelListHandler(JoyOnKeyPressGetModelListHandler);
            }
        }

        if (fLastEventTime > 0f && Time.time > (fLastEventTime + 0.1f))
        {
            fLastEventTime = Time.time;
        }
    }
コード例 #2
0
    public void Update()
    {
        if (mJoystick == null)
        {
            mJoystick = mUIModule.GetUI <NFUIJoystick>();

            if (mJoystick)
            {
                mJoystick.SetPointerDownHandler(JoyOnPointerDownHandler);
                mJoystick.SetPointerDragHandler(JoyOnPointerDragHandler);
                mJoystick.SetPointerUpHandler(JoyOnPointerUpHandler);
            }
        }

        if (fLastEventTime > 0f && Time.time > (fLastEventTime + 0.2f))
        {
            fLastEventTime = Time.time;

            MoveEvent(fLastEventdirection);
        }
    }