This commit is contained in:
Benjamín 2021-07-20 18:23:19 +02:00
parent 0defb6f05e
commit 6639062988

@ -28,7 +28,11 @@ public class PlayerControls : MonoBehaviour
jumping = Input.GetButton("Jump") || Input.GetAxisRaw("Vertical") > 0;
crouching = Input.GetButton("Crouch") || Input.GetAxisRaw("Vertical") < 0;
animator.SetFloat("Horizontal_speed", horizonatalaxis);
switchy = Input.GetButton("Switch");
if(Input.GetButtonDown("Switch")) {
switchy = !switchy;
}
if (switchy){
transform.rotation = new Quaternion(0f, 0f, 180f, 0f);
rigidbody.sharedMaterial = top;