Ejemplo n.º 1
0
    void StateLogic()
    {
        float step = speed * direction;

        if (state + step >= 1)
        {
            state = 1;
        }
        else if ((state + step) <= 0)
        {
            state = 0;
        }
        else
        {
            state += step;
        }

        oscillator.OscillationLogic(state);
        launcher.SetState(state);
    }