Changed IsKeyPressed('R') to IsKeyPressed(KEY_R) for Physics examples! (#1666)
This commit is contained in:
parent
b573ff3e7a
commit
8e1e1ef970
5 changed files with 6 additions and 6 deletions
|
@ -51,7 +51,7 @@ int main(void)
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
UpdatePhysics(); // Update physics system
|
UpdatePhysics(); // Update physics system
|
||||||
|
|
||||||
if (IsKeyPressed('R')) // Reset physics system
|
if (IsKeyPressed(KEY_R)) // Reset physics system
|
||||||
{
|
{
|
||||||
ResetPhysics();
|
ResetPhysics();
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ int main(void)
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
UpdatePhysics(); // Update physics system
|
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
|
// Reset dynamic physics bodies position, velocity and rotation
|
||||||
bodyA->position = (Vector2){ 35, screenHeight*0.6f };
|
bodyA->position = (Vector2){ 35, screenHeight*0.6f };
|
||||||
|
|
|
@ -63,7 +63,7 @@ int main(void)
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
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
|
// Reset movement physics body position, velocity and rotation
|
||||||
body->position = (Vector2){ screenWidth/2, screenHeight/2 };
|
body->position = (Vector2){ screenWidth/2, screenHeight/2 };
|
||||||
|
|
|
@ -59,7 +59,7 @@ int main(void)
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
UpdatePhysics(); // Update physics system
|
UpdatePhysics(); // Update physics system
|
||||||
|
|
||||||
if (IsKeyPressed('R')) // Reset physics input
|
if (IsKeyPressed(KEY_R)) // Reset physics input
|
||||||
{
|
{
|
||||||
// Reset circles physics bodies position and velocity
|
// Reset circles physics bodies position and velocity
|
||||||
circleA->position = (Vector2){ screenWidth*0.25f, screenHeight/2 };
|
circleA->position = (Vector2){ screenWidth*0.25f, screenHeight/2 };
|
||||||
|
|
|
@ -46,7 +46,7 @@ int main(void)
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
UpdatePhysics(); // Update physics system
|
UpdatePhysics(); // Update physics system
|
||||||
|
|
||||||
if (IsKeyPressed('R')) // Reset physics input
|
if (IsKeyPressed(KEY_R)) // Reset physics input
|
||||||
{
|
{
|
||||||
ResetPhysics();
|
ResetPhysics();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue