2
0
mirror of https://github.com/raylib-cs/raylib-cs synced 2025-06-30 19:03:42 -04:00

Initial example update

- Updating examples with new changes.
This commit is contained in:
2019-02-11 11:30:02 +00:00
parent f4ef94d63f
commit a01efa4a09
45 changed files with 419 additions and 389 deletions

View File

@ -62,7 +62,7 @@ public partial class textures_image_generation
{
// Update
//----------------------------------------------------------------------------------
if (IsMouseButtonPressed(MOUSE_LEFT_BUTTON) || IsKeyPressed(KEY_RIGHT))
if (IsMouseButtonPressed(MouseButton.MOUSE_LEFT_BUTTON) || IsKeyPressed(KeyboardKey.KEY_RIGHT))
{
currentTexture = (currentTexture + 1)%NUM_TEXTURES; // Cycle between the textures
}

View File

@ -74,13 +74,13 @@ public partial class textures_image_processing
{
// Update
//----------------------------------------------------------------------------------
if (IsKeyPressed(KEY_DOWN))
if (IsKeyPressed(KeyboardKey.KEY_DOWN))
{
currentProcess++;
if (currentProcess > 7) currentProcess = 0;
textureReload = true;
}
else if (IsKeyPressed(KEY_UP))
else if (IsKeyPressed(KeyboardKey.KEY_UP))
{
currentProcess--;
if (currentProcess < 0) currentProcess = 7;

View File

@ -47,7 +47,7 @@ public partial class textures_image_text
{
// Update
//----------------------------------------------------------------------------------
if (IsKeyDown(KEY_SPACE)) showFont = true;
if (IsKeyDown(KeyboardKey.KEY_SPACE)) showFont = true;
else showFont = false;
//----------------------------------------------------------------------------------

View File

@ -56,7 +56,7 @@ public partial class textures_particles_blending
Texture2D smoke = LoadTexture("resources/smoke.png");
int blending = (int)BLEND_ALPHA;
var blending = BlendMode.BLEND_ALPHA;
SetTargetFPS(60);
//--------------------------------------------------------------------------------------
@ -95,10 +95,10 @@ public partial class textures_particles_blending
}
}
if (IsKeyPressed(KEY_SPACE))
if (IsKeyPressed(KeyboardKey.KEY_SPACE))
{
if (blending == (int)BLEND_ALPHA) blending = (int)BLEND_ADDITIVE;
else blending = (int)BLEND_ALPHA;
if (blending == BlendMode.BLEND_ALPHA) blending = BlendMode.BLEND_ADDITIVE;
else blending = BlendMode.BLEND_ALPHA;
}
//----------------------------------------------------------------------------------

View File

@ -57,8 +57,8 @@ public partial class textures_rectangle
frameRec.x = (float)currentFrame*(float)scarfy.width/6;
}
if (IsKeyPressed(KEY_RIGHT)) framesSpeed++;
else if (IsKeyPressed(KEY_LEFT)) framesSpeed--;
if (IsKeyPressed(KeyboardKey.KEY_RIGHT)) framesSpeed++;
else if (IsKeyPressed(KeyboardKey.KEY_LEFT)) framesSpeed--;
if (framesSpeed > MAX_FRAME_SPEED) framesSpeed = MAX_FRAME_SPEED;
else if (framesSpeed < MIN_FRAME_SPEED) framesSpeed = MIN_FRAME_SPEED;