Bump
This commit is contained in:
@@ -4,17 +4,18 @@
|
|||||||
#include <Tourmaline/Systems/Logging.hpp>
|
#include <Tourmaline/Systems/Logging.hpp>
|
||||||
#include <Tourmaline/Systems/Random.hpp>
|
#include <Tourmaline/Systems/Random.hpp>
|
||||||
#include <Tourmaline/Types.hpp>
|
#include <Tourmaline/Types.hpp>
|
||||||
#include <print>
|
|
||||||
|
|
||||||
using namespace Tourmaline;
|
using namespace Tourmaline;
|
||||||
using namespace Systems;
|
using namespace Systems;
|
||||||
|
|
||||||
|
struct test : public ECS::Component {
|
||||||
|
int x;
|
||||||
|
};
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
ECS::World game;
|
ECS::World game;
|
||||||
auto player = game.CreateEntity();
|
auto player = game.CreateEntity();
|
||||||
auto &coordinates = game.GetComponent<Components::Position>(player);
|
auto &coordinates = game.GetComponent<Components::Base>(player);
|
||||||
|
|
||||||
std::print("Entity {}, x = {}, y = {}, z = {}\n", player.asString(),
|
|
||||||
coordinates.x, coordinates.y, coordinates.z);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
for (int x = 0; x < 100000; x++) {
|
for (int x = 0; x < 100000; x++) {
|
||||||
@@ -24,10 +25,11 @@ int main() {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
coordinates.x += 4;
|
coordinates.x += 4;
|
||||||
coordinates.y -= 2.5;
|
Logging::LogFormatted("x = {}", "test", Logging::LogLevel::Info,
|
||||||
coordinates.z = -10;
|
coordinates.x);
|
||||||
|
|
||||||
|
// This should fail
|
||||||
|
auto &testComp = game.GetComponent<test>(player);
|
||||||
|
|
||||||
std::print("Entity {}, x = {}, y = {}, z = {}\n", player.asString(),
|
|
||||||
coordinates.x, coordinates.y, coordinates.z);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user