Esempio n. 1
0
    void FixedUpdate()
    {
        // Vector2 direction = TouchPad.GetDirection();
        int moving = button.GetMoving();

        rb.velocity = new Vector2(moving * 2.16f, rb.velocity.y);

        if (moving > 0 && !filumR)
        {
            filumR = false;
            flip();
        }
        else if (moving < 0 && filumR)
        {
            filumR = true;
            flip();
        }
    }