34 lines
947 B
C++
34 lines
947 B
C++
#include <Tourmaline/Containers/DualkeyMap.hpp>
|
|
#include <Tourmaline/Systems/ECS.hpp>
|
|
#include <Tourmaline/Systems/ECS/BuiltinComponents.hpp>
|
|
#include <Tourmaline/Systems/Logging.hpp>
|
|
#include <Tourmaline/Systems/Random.hpp>
|
|
#include <Tourmaline/Types.hpp>
|
|
#include <print>
|
|
|
|
using namespace Tourmaline;
|
|
using namespace Systems;
|
|
int main() {
|
|
ECS::World game;
|
|
auto player = game.CreateEntity();
|
|
auto &coordinates = game.GetComponent<Components::Position>(player);
|
|
|
|
std::print("Entity {}, x = {}, y = {}, z = {}\n", player.asString(),
|
|
coordinates.x, coordinates.y, coordinates.z);
|
|
|
|
/*
|
|
for (int x = 0; x < 100000; x++) {
|
|
// Bad idea, for testing we do need to do this
|
|
game.CreateEntity();
|
|
}
|
|
*/
|
|
|
|
coordinates.x += 4;
|
|
coordinates.y -= 2.5;
|
|
coordinates.z = -10;
|
|
|
|
std::print("Entity {}, x = {}, y = {}, z = {}\n", player.asString(),
|
|
coordinates.x, coordinates.y, coordinates.z);
|
|
return 0;
|
|
}
|