Compare commits
No commits in common. "unstable" and "master" have entirely different histories.
5 changed files with 7 additions and 15 deletions
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
22
src/Main.c
22
src/Main.c
|
@ -5,10 +5,10 @@
|
|||
#include "Debug.h"
|
||||
#include "Copying.h"
|
||||
|
||||
/* Functions */
|
||||
// Functions
|
||||
|
||||
|
||||
/* Globles */
|
||||
// Globles
|
||||
|
||||
// Position Varaibles
|
||||
float EnemyPos_x = 482.0f, EnemyPos_y = 62.0f;
|
||||
|
@ -26,19 +26,16 @@ void Setup()
|
|||
|
||||
InitWindow(screenWidth, screenHeight, "Tux Vs Windows");
|
||||
|
||||
InitAudioDevice();
|
||||
|
||||
SetTargetFPS(60);
|
||||
}
|
||||
|
||||
// GameLoop Code
|
||||
void MainGameLoop()
|
||||
{
|
||||
// Load Assets
|
||||
Texture2D tux = LoadTexture("assets/gfx/tux.png");
|
||||
Texture2D enemy = LoadTexture("assets/gfx/enemy.png");
|
||||
Texture2D arctic = LoadTexture("assets/gfx/arctic.png");
|
||||
Sound sfxHit = LoadSound("assets/sfx/hit.wav");
|
||||
// Load Textures
|
||||
Texture2D tux = LoadTexture("assets/tux.png");
|
||||
Texture2D enemy = LoadTexture("assets/enemy.png");
|
||||
Texture2D arctic = LoadTexture("assets/arctic.png");
|
||||
|
||||
// Hitboxes
|
||||
Rectangle EnemyHitbox = { GetScreenWidth()/2.0f - 30, GetScreenHeight()/2.0f - 30, 290, 300};
|
||||
|
@ -80,7 +77,6 @@ void MainGameLoop()
|
|||
|
||||
if (collision) {
|
||||
DrawText("FINALY BASIC AWFUL COLLISION", 50, 18, 20, MAROON);
|
||||
PlaySound(sfxHit);
|
||||
} else {
|
||||
DrawText("Tux Vs X ENGINE PROTOTYPE please read the LINCENSE", 50, 18, 20, BLACK);
|
||||
}
|
||||
|
@ -90,21 +86,17 @@ void MainGameLoop()
|
|||
|
||||
EndDrawing();
|
||||
}
|
||||
// Unload Assets
|
||||
// Unload Textures
|
||||
UnloadTexture(tux);
|
||||
UnloadTexture(enemy);
|
||||
UnloadTexture(arctic);
|
||||
UnloadSound(sfxHit);
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
Setup();
|
||||
MainGameLoop();
|
||||
|
||||
CloseAudioDevice();
|
||||
CloseWindow();
|
||||
|
||||
License();
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue