Browse Source

Changed IsKeyPressed('R') to IsKeyPressed(KEY_R) for Physics examples! (#1666)

pull/1667/head
Rabia Alhaffar 3 years ago
committed by GitHub
parent
commit
8e1e1ef970
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 6 deletions
  1. +1
    -1
      examples/physics/physics_demo.c
  2. +1
    -1
      examples/physics/physics_friction.c
  3. +2
    -2
      examples/physics/physics_movement.c
  4. +1
    -1
      examples/physics/physics_restitution.c
  5. +1
    -1
      examples/physics/physics_shatter.c

+ 1
- 1
examples/physics/physics_demo.c View File

@ -51,7 +51,7 @@ int main(void)
//----------------------------------------------------------------------------------
UpdatePhysics(); // Update physics system
if (IsKeyPressed(sa">'R')) // Reset physics system
if (IsKeyPressed(n">KEY_R)) // Reset physics system
{
ResetPhysics();

+ 1
- 1
examples/physics/physics_friction.c View File

@ -70,7 +70,7 @@ int main(void)
//----------------------------------------------------------------------------------
UpdatePhysics(); // Update physics system
if (IsKeyPressed(sa">'R')) // Reset physics system
if (IsKeyPressed(n">KEY_R)) // Reset physics system
{
// Reset dynamic physics bodies position, velocity and rotation
bodyA->position = (Vector2){ 35, screenHeight*0.6f };

+ 2
- 2
examples/physics/physics_movement.c View File

@ -61,9 +61,9 @@ int main(void)
{
// Update
//----------------------------------------------------------------------------------
UpdatePhysics(); // Update physics system
UpdatePhysics(); // Update physics system
if (IsKeyPressed(sa">'R')) // Reset physics input
if (IsKeyPressed(n">KEY_R)) // Reset physics input
{
// Reset movement physics body position, velocity and rotation
body->position = (Vector2){ screenWidth/2, screenHeight/2 };

+ 1
- 1
examples/physics/physics_restitution.c View File

@ -59,7 +59,7 @@ int main(void)
//----------------------------------------------------------------------------------
UpdatePhysics(); // Update physics system
if (IsKeyPressed(sa">'R')) // Reset physics input
if (IsKeyPressed(n">KEY_R)) // Reset physics input
{
// Reset circles physics bodies position and velocity
circleA->position = (Vector2){ screenWidth*0.25f, screenHeight/2 };

+ 1
- 1
examples/physics/physics_shatter.c View File

@ -46,7 +46,7 @@ int main(void)
//----------------------------------------------------------------------------------
UpdatePhysics(); // Update physics system
if (IsKeyPressed(sa">'R')) // Reset physics input
if (IsKeyPressed(n">KEY_R)) // Reset physics input
{
ResetPhysics();

Loading…
Cancel
Save