You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
479 B
36 lines
479 B
#include "raylib.h"
|
|
|
|
int main(){
|
|
|
|
Texture2D sprite;
|
|
|
|
float posX = 0;
|
|
|
|
InitWindow(800, 450, "basic window");
|
|
|
|
sprite = LoadTexture("amulet.png");
|
|
|
|
|
|
SetTargetFPS(60);
|
|
while(!WindowShouldClose()){
|
|
|
|
posX += GetFrameTime() * 100;
|
|
|
|
BeginDrawing();
|
|
|
|
ClearBackground(RAYWHITE);
|
|
|
|
DrawTexture(sprite, 10, 10, WHITE);
|
|
|
|
DrawRectangle(posX,100,100,100, BLUE);
|
|
|
|
|
|
EndDrawing();
|
|
|
|
}
|
|
|
|
CloseWindow();
|
|
|
|
return 0;
|
|
|
|
} |