#pragma once #include "Components.hpp" #include "Entity.hpp" #include std::shared_ptr CreateProbe() { auto e = std::make_shared(); auto &transform = e->AddComponent(); transform.x = 96.0f; transform.y = 230.0f; e->AddComponent(); auto &physics = e->AddComponent(); physics.vx = 108.0f; physics.vy = 0.0f; physics.speedCap = 8192.0f; e->AddComponent(); e->AddComponent(); e->AddComponent(); e->AddComponent(); return e; } std::shared_ptr CreateGravityWell() { auto e = std::make_shared(); auto &transform = e->AddComponent(); transform.x = 96.0f; transform.y = 230.0f; auto &well = e->AddComponent(); well.mass = (float)(1 << 22); well.minDist = 28.0f; well.followLerp = 12.0f; e->AddComponent(); return e; } std::shared_ptr CreateStar(float x, float y) { auto e = std::make_shared(); auto &t = e->AddComponent(); t.x = x; t.y = y; auto &scrollable = e->AddComponent(); scrollable.worldX = x; e->AddComponent(); e->AddComponent(); e->AddComponent(); return e; } std::shared_ptr CreateAsteroid(float x, float y) { auto e = std::make_shared(); auto &t = e->AddComponent(); t.x = x; t.y = y; auto &scrollable = e->AddComponent(); scrollable.worldX = x; e->AddComponent(); e->AddComponent(); return e; } std::shared_ptr CreateNullZone(float x, float width) { auto e = std::make_shared(); auto &t = e->AddComponent(); t.x = x; auto &scrollable = e->AddComponent(); scrollable.worldX = x; auto &nullZone = e->AddComponent(); nullZone.width = width; e->AddComponent(); return e; } std::shared_ptr CreateWorld() { auto e = std::make_shared(); e->AddComponent(); e->AddComponent(); return e; } std::shared_ptr CreateHUD() { auto e = std::make_shared(); e->AddComponent(); e->AddComponent(); e->AddComponent(); return e; }