-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
42 lines (26 loc) · 722 Bytes
/
Copy pathmain.cpp
File metadata and controls
42 lines (26 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include <raylib.h>
#include "game.h"
using namespace std;
int main()
{
const int screenWidth = 1360;
const int screenHeight = 760;
InitWindow(screenWidth, screenHeight, "Tower Defense Mayhem");
Game game;
SetTargetFPS(60);
while (!WindowShouldClose())
{
BeginDrawing();
ClearBackground(RAYWHITE);
if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT))
{
Vector2 mousePos = GetMousePosition();
cout << "Mouse Clicked at: X: " << mousePos.x << " | Y: " << mousePos.y << endl;
}
game.Draw();
game.Update();
EndDrawing();
}
CloseWindow();
return 0;
}