Пример #1
0
    // Update is called once per frame
    void Update()
    {
        Debug.Log("Get Value " + rotator.GetValue().ToString("F1"));
        Debug.Log("Get Step Value " + rotator.GetStepValue(rotator.GetValue()));

        leverValue = rotator.GetStepValue(rotator.GetValue());

        if (leverValue == 1 || leverValue == -1)
        {
            leverBool = true;
        }
        else
        {
            leverBool = false;
        }
    }
Пример #2
0
    // Update is called once per frame
    void Update()
    {
        //Debug.Log("Get Value " + rotator.GetValue().ToString("F1"));
        //Debug.Log("Get Step Value " + rotator.GetStepValue(rotator.GetValue()));

        leverValue = rotator.GetStepValue(rotator.GetValue());

        //rotator.MaxLimitReached += Rotator_MaxLimitReached;
        //rotator.MinLimitReached += Rotator_MinLimitReached;
        //rotator.MaxLimitExited += Rotator_MaxLimitReached;



        if (leverValue == 1 || leverValue == -1)
        {
            leverBool = true;
        }
        else
        {
            leverBool = false;
        }
    }