first commit
This commit is contained in:
59
game.h
Normal file
59
game.h
Normal file
@@ -0,0 +1,59 @@
|
||||
#pragma once
|
||||
#include <GLAD/glad.h>
|
||||
#include <GLFW/glfw3.h>
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
#include <imgui/imgui.h>
|
||||
#include <imgui/imgui_impl_glfw.h>
|
||||
#include <imgui/imgui_impl_opengl3.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include <stb_image.h>
|
||||
#include "resourceManager.h"
|
||||
#include "SpriteRenderer.h"
|
||||
#include "Player.h"
|
||||
#include "Enemy.h"
|
||||
#include "Object.h"
|
||||
#include "terrainFile/world.h"
|
||||
|
||||
#include <cute_headers-master/cute_c2.h>
|
||||
#include <cute_headers-master/cute_gl.h>
|
||||
|
||||
#include <glad/glad.h>
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtc/matrix_transform.hpp>
|
||||
#include <glm/gtc/type_ptr.hpp>
|
||||
class Game {
|
||||
private:
|
||||
float x = 0;
|
||||
|
||||
SpriteRenderer* renderer = nullptr;
|
||||
Player* player = nullptr;
|
||||
World* world = nullptr;
|
||||
Enemy* enemy = nullptr;
|
||||
//Object* dirtBlock = nullptr;
|
||||
//Object* dirtBlock1 = nullptr;
|
||||
//position
|
||||
float pos = 0.0f;
|
||||
//----
|
||||
GLFWwindow* window = nullptr;
|
||||
|
||||
|
||||
float scrWidth, scrHeight;
|
||||
public:
|
||||
//constructor & destructor
|
||||
Game(const unsigned int SCR_WIDTH, const unsigned int SCR_HEIGHT, const char* name);
|
||||
~Game();
|
||||
//Inititialise Game state
|
||||
void init();
|
||||
//--------imgui--------
|
||||
void renderImgui();
|
||||
|
||||
//Gameloop
|
||||
void handleEvents(float dt);
|
||||
void render();
|
||||
//getset
|
||||
GLFWwindow* getWindow();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user