mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-25 10:22:33 -05:00
RENAMED: example: textures_rectangle -> textures_sprite_anim
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [textures] example - Texture loading and drawing a part defined by a rectangle
|
||||
* raylib [textures] example - Sprite animation
|
||||
*
|
||||
* This example has been created using raylib 1.3 (www.raylib.com)
|
||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
||||
@ -24,7 +24,7 @@ int main(void)
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [texture] example - texture rectangle");
|
||||
InitWindow(screenWidth, screenHeight, "raylib [texture] example - sprite anim");
|
||||
|
||||
// NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required)
|
||||
Texture2D scarfy = LoadTexture("resources/scarfy.png"); // Texture loading
|
||||
@ -56,6 +56,7 @@ int main(void)
|
||||
frameRec.x = (float)currentFrame*(float)scarfy.width/6;
|
||||
}
|
||||
|
||||
// Control frames speed
|
||||
if (IsKeyPressed(KEY_RIGHT)) framesSpeed++;
|
||||
else if (IsKeyPressed(KEY_LEFT)) framesSpeed--;
|
||||
|
||||
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
Reference in New Issue
Block a user