Initialize basic game
Signed-off-by: Daniel Henry <iamdanhenry@gmail.com>
This commit is contained in:
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
build/
|
||||||
|
.cache/
|
||||||
|
.git/
|
||||||
|
.compile_commands.json
|
||||||
@@ -10,5 +10,13 @@ set(CMAKE_CXX_EXTENSIONS OFF)
|
|||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
|
|
||||||
# Add both projects
|
# Add both projects
|
||||||
# add_subdirectory(craft)
|
add_subdirectory(external/craft)
|
||||||
# add_subdirectory(NotZelda)
|
|
||||||
|
add_executable(PongCraft
|
||||||
|
include/Pong.h
|
||||||
|
src/Pong.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(PongCraft PRIVATE include)
|
||||||
|
|
||||||
|
target_link_libraries(PongCraft PUBLIC CraftEngine)
|
||||||
|
|||||||
1
compile_commands.json
Symbolic link
1
compile_commands.json
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
build/compile_commands.json
|
||||||
2
external/craft
vendored
2
external/craft
vendored
Submodule external/craft updated: 301e862438...d71f3bfab7
7
include/Pong.h
Normal file
7
include/Pong.h
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <Craft.h>
|
||||||
|
|
||||||
|
class PongWorld : public craft::World {
|
||||||
|
void Begin() override;
|
||||||
|
void Tick(float deltaTime) override;
|
||||||
|
};
|
||||||
10
src/Pong.cpp
Normal file
10
src/Pong.cpp
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
#include "Pong.h"
|
||||||
|
|
||||||
|
CRAFT_INITIALIZE(PongWorld);
|
||||||
|
|
||||||
|
void PongWorld::Begin() {
|
||||||
|
World::Begin();
|
||||||
|
LOG("The PongWorld has BEGUN!");
|
||||||
|
}
|
||||||
|
|
||||||
|
void PongWorld::Tick(float deltaTime) { World::Tick(deltaTime); }
|
||||||
Reference in New Issue
Block a user