Compare commits
No commits in common. "0ff02760f214bdc87e95d71b62a99854289d5e12" and "50ffe0f5750d66eb9fac84c1b886889f4872b8c9" have entirely different histories.
0ff02760f2
...
50ffe0f575
44
README.md
44
README.md
@ -1,45 +1,3 @@
|
|||||||
<br />
|
# ObstacleGame
|
||||||
<div align="center">
|
|
||||||
<a href="https://git.gnm.dev/Mathias/ObstacleGame/">
|
|
||||||
<img src="https://git.gnm.dev/Mathias/ObstacleGame/raw/branch/main/res/logo.png" alt="Logo" width="200" height="200">
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
## 🎮 Obstacle Game
|
|
||||||
|
|
||||||
Entwickelt für die Berufschule: Ein Spiel, in welchem du Gegnern ausweichen musst.
|
Entwickelt für die Berufschule: Ein Spiel, in welchem du Gegnern ausweichen musst.
|
||||||
|
|
||||||
### ⬇️ Installation
|
|
||||||
|
|
||||||
1. Clone the repo
|
|
||||||
```sh
|
|
||||||
git clone https://git.gnm.dev/Mathias/ObstacleGame.git
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Install SDL2, SDL2_image, SDL2_ttf, SDL2_mixer
|
|
||||||
```sh
|
|
||||||
sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev libsdl2-mixer-dev
|
|
||||||
```
|
|
||||||
|
|
||||||
3. Install CMake
|
|
||||||
```sh
|
|
||||||
sudo apt-get install cmake
|
|
||||||
```
|
|
||||||
|
|
||||||
4. Build the project
|
|
||||||
```sh
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake ..
|
|
||||||
make
|
|
||||||
```
|
|
||||||
|
|
||||||
5. Run the project
|
|
||||||
```sh
|
|
||||||
./ObstacleGame
|
|
||||||
```
|
|
||||||
|
|
||||||
### 📝 License
|
|
||||||
|
|
||||||
Distributed under the MIT License. See `LICENSE` for more information.
|
|
||||||
|
@ -20,8 +20,6 @@ int main() {
|
|||||||
|
|
||||||
std::shared_ptr<GameState> currentState = states["main_menu"];
|
std::shared_ptr<GameState> currentState = states["main_menu"];
|
||||||
|
|
||||||
currentState->init();
|
|
||||||
|
|
||||||
bool running = true;
|
bool running = true;
|
||||||
while (running) {
|
while (running) {
|
||||||
SDL_Event event;
|
SDL_Event event;
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
#ifndef INGAME_STATE_H
|
|
||||||
#define INGAME_STATE_H
|
|
||||||
|
|
||||||
#include "../entities/Opponent.h"
|
#include "../entities/Opponent.h"
|
||||||
#include "GameState.h"
|
#include "GameState.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@ -42,5 +39,3 @@ public:
|
|||||||
void renderOpponent(SDL_Renderer* renderer, SDL_Texture* opponentTexture, Opponent o) const;
|
void renderOpponent(SDL_Renderer* renderer, SDL_Texture* opponentTexture, Opponent o) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
@ -1,14 +1,6 @@
|
|||||||
#include "MainMenuState.h"
|
#include "MainMenuState.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
void MainMenuState::update() {
|
|
||||||
// Handle updates like animations if necessary
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainMenuState::init() {
|
|
||||||
std::cout << "Main menu state initialized\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainMenuState::handleEvents(SDL_Event& event) {
|
void MainMenuState::handleEvents(SDL_Event& event) {
|
||||||
if (event.type == SDL_KEYDOWN) {
|
if (event.type == SDL_KEYDOWN) {
|
||||||
switch (event.key.keysym.sym) {
|
switch (event.key.keysym.sym) {
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
#ifndef MAIN_MNU_STATE_H
|
|
||||||
#define MAIN_MNU_STATE_H
|
|
||||||
|
|
||||||
#include "GameState.h"
|
#include "GameState.h"
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL.h>
|
||||||
#include <SDL2/SDL_ttf.h>
|
#include <SDL2/SDL_ttf.h>
|
||||||
@ -12,5 +9,3 @@ public:
|
|||||||
void update() override;
|
void update() override;
|
||||||
void render(SDL_Renderer* renderer) override;
|
void render(SDL_Renderer* renderer) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
Loading…
x
Reference in New Issue
Block a user