Compare commits
1 Commits
Author | SHA1 | Date |
---|---|---|
Return0ne | 6987f4c2a5 |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
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,16 +26,19 @@ void Setup()
|
|||
|
||||
InitWindow(screenWidth, screenHeight, "Tux Vs Windows");
|
||||
|
||||
InitAudioDevice();
|
||||
|
||||
SetTargetFPS(60);
|
||||
}
|
||||
|
||||
// GameLoop Code
|
||||
void MainGameLoop()
|
||||
{
|
||||
// Load Textures
|
||||
Texture2D tux = LoadTexture("assets/tux.png");
|
||||
Texture2D enemy = LoadTexture("assets/enemy.png");
|
||||
Texture2D arctic = LoadTexture("assets/arctic.png");
|
||||
// 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");
|
||||
|
||||
// Hitboxes
|
||||
Rectangle EnemyHitbox = { GetScreenWidth()/2.0f - 30, GetScreenHeight()/2.0f - 30, 290, 300};
|
||||
|
@ -77,6 +80,7 @@ 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);
|
||||
}
|
||||
|
@ -86,17 +90,21 @@ void MainGameLoop()
|
|||
|
||||
EndDrawing();
|
||||
}
|
||||
// Unload Textures
|
||||
// Unload Assets
|
||||
UnloadTexture(tux);
|
||||
UnloadTexture(enemy);
|
||||
UnloadTexture(arctic);
|
||||
UnloadSound(sfxHit);
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
Setup();
|
||||
MainGameLoop();
|
||||
|
||||
CloseAudioDevice();
|
||||
CloseWindow();
|
||||
|
||||
License();
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue