From 8e1e1ef9701433de9dddc3e4cbe5028d96b757b4 Mon Sep 17 00:00:00 2001 From: Rabia Alhaffar Date: Mon, 22 Mar 2021 17:44:12 +0200 Subject: [PATCH] Changed IsKeyPressed('R') to IsKeyPressed(KEY_R) for Physics examples! (#1666) --- examples/physics/physics_demo.c | 2 +- examples/physics/physics_friction.c | 2 +- examples/physics/physics_movement.c | 4 ++-- examples/physics/physics_restitution.c | 2 +- examples/physics/physics_shatter.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/physics/physics_demo.c b/examples/physics/physics_demo.c index 9763bf990..98a92bccc 100644 --- a/examples/physics/physics_demo.c +++ b/examples/physics/physics_demo.c @@ -51,7 +51,7 @@ int main(void) //---------------------------------------------------------------------------------- UpdatePhysics(); // Update physics system - if (IsKeyPressed('R')) // Reset physics system + if (IsKeyPressed(KEY_R)) // Reset physics system { ResetPhysics(); diff --git a/examples/physics/physics_friction.c b/examples/physics/physics_friction.c index b91950391..d1ade9796 100644 --- a/examples/physics/physics_friction.c +++ b/examples/physics/physics_friction.c @@ -70,7 +70,7 @@ int main(void) //---------------------------------------------------------------------------------- UpdatePhysics(); // Update physics system - if (IsKeyPressed('R')) // Reset physics system + if (IsKeyPressed(KEY_R)) // Reset physics system { // Reset dynamic physics bodies position, velocity and rotation bodyA->position = (Vector2){ 35, screenHeight*0.6f }; diff --git a/examples/physics/physics_movement.c b/examples/physics/physics_movement.c index 73a1f9277..d6155da15 100644 --- a/examples/physics/physics_movement.c +++ b/examples/physics/physics_movement.c @@ -61,9 +61,9 @@ int main(void) { // Update //---------------------------------------------------------------------------------- - UpdatePhysics(); // Update physics system + UpdatePhysics(); // Update physics system - if (IsKeyPressed('R')) // Reset physics input + if (IsKeyPressed(KEY_R)) // Reset physics input { // Reset movement physics body position, velocity and rotation body->position = (Vector2){ screenWidth/2, screenHeight/2 }; diff --git a/examples/physics/physics_restitution.c b/examples/physics/physics_restitution.c index 787db98d9..7fab7cb3f 100644 --- a/examples/physics/physics_restitution.c +++ b/examples/physics/physics_restitution.c @@ -59,7 +59,7 @@ int main(void) //---------------------------------------------------------------------------------- UpdatePhysics(); // Update physics system - if (IsKeyPressed('R')) // Reset physics input + if (IsKeyPressed(KEY_R)) // Reset physics input { // Reset circles physics bodies position and velocity circleA->position = (Vector2){ screenWidth*0.25f, screenHeight/2 }; diff --git a/examples/physics/physics_shatter.c b/examples/physics/physics_shatter.c index 46876ff7c..afabd775d 100644 --- a/examples/physics/physics_shatter.c +++ b/examples/physics/physics_shatter.c @@ -46,7 +46,7 @@ int main(void) //---------------------------------------------------------------------------------- UpdatePhysics(); // Update physics system - if (IsKeyPressed('R')) // Reset physics input + if (IsKeyPressed(KEY_R)) // Reset physics input { ResetPhysics();