Add details
parent
3ee599caeb
commit
a97770a8eb
|
|
@ -35,7 +35,14 @@ std::shared_ptr<Entity> CreateProbe() {
|
||||||
if (!transform) {
|
if (!transform) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
DrawCircleV({transform->get().x, transform->get().y}, 7.0f, Color{250, 244, 227, 255});
|
|
||||||
|
const Color PROBE_COLOR = Color{120, 210, 255, 255};
|
||||||
|
const Color PROBE_HIGHLIGHT = Color{255, 255, 255, 120};
|
||||||
|
|
||||||
|
DrawCircleV({transform->get().x, transform->get().y}, 7.0f, PROBE_COLOR);
|
||||||
|
|
||||||
|
DrawCircleV({transform->get().x - 1, transform->get().y - 1}, 3.0f,
|
||||||
|
PROBE_HIGHLIGHT);
|
||||||
};
|
};
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
|
|
@ -71,7 +78,7 @@ std::shared_ptr<Entity> CreateStar(float x, float y) {
|
||||||
auto &scrollable = e->AddComponent<ScrollableComponent>();
|
auto &scrollable = e->AddComponent<ScrollableComponent>();
|
||||||
scrollable.worldX = x;
|
scrollable.worldX = x;
|
||||||
auto &collider = e->AddComponent<ColliderComponent>();
|
auto &collider = e->AddComponent<ColliderComponent>();
|
||||||
collider.radius = 6.0f;
|
collider.radius = 12.0f;
|
||||||
|
|
||||||
e->AddComponent<CollectibleComponent>();
|
e->AddComponent<CollectibleComponent>();
|
||||||
auto &render = e->AddComponent<RenderComponent>();
|
auto &render = e->AddComponent<RenderComponent>();
|
||||||
|
|
@ -80,7 +87,11 @@ std::shared_ptr<Entity> CreateStar(float x, float y) {
|
||||||
if (!transform) {
|
if (!transform) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
DrawCircleV({transform->get().x, transform->get().y}, 6.0f, Color{255, 223, 86, 255});
|
Vector2 center = {transform->get().x, transform->get().y};
|
||||||
|
Color STAR_COLOR = Color{255, 223, 86, 255};
|
||||||
|
Color GLOW_COLOR = Color{255, 223, 86, 120};
|
||||||
|
DrawCircleV(center, 12.0f, GLOW_COLOR);
|
||||||
|
DrawPoly(center, 3, 4.0f, transform->get().x, STAR_COLOR);
|
||||||
};
|
};
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
|
|
@ -151,8 +162,12 @@ std::shared_ptr<Entity> CreateNullZone(float x, float width) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawRectangle(static_cast<int>(transform->get().x), 0, static_cast<int>(zone->get().width),
|
int x = (int)(transform->get().x);
|
||||||
|
|
||||||
|
DrawRectangle(x, 0, (int)(zone->get().width),
|
||||||
GetScreenHeight(), Color{96, 64, 146, 80});
|
GetScreenHeight(), Color{96, 64, 146, 80});
|
||||||
|
|
||||||
|
DrawText("Null Zone", x + 8, 12, 16, Color{96, 64, 146, 200});
|
||||||
};
|
};
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
* Defines a vertical strip where gravity pull is disabled.
|
* Defines a vertical strip where gravity pull is disabled.
|
||||||
*/
|
*/
|
||||||
struct NullZoneComponent : public Component {
|
struct NullZoneComponent : public Component {
|
||||||
float width = 70.0f;
|
float width = 120.0f;
|
||||||
|
|
||||||
void Setup() override;
|
void Setup() override;
|
||||||
void Update(float dt) override;
|
void Update(float dt) override;
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ void GameplayScene::Enter() {
|
||||||
entities.push_back(CreateProbe());
|
entities.push_back(CreateProbe());
|
||||||
entities.push_back(CreateStar(900.0f, 120.0f));
|
entities.push_back(CreateStar(900.0f, 120.0f));
|
||||||
entities.push_back(CreateAsteroid(1100.0f, 330.0f));
|
entities.push_back(CreateAsteroid(1100.0f, 330.0f));
|
||||||
entities.push_back(CreateNullZone(1280.0f, 70.0f));
|
entities.push_back(CreateNullZone(1280.0f, 120.0f));
|
||||||
entities.push_back(CreateHUD());
|
entities.push_back(CreateHUD());
|
||||||
|
|
||||||
if (auto meter = entities.back()->GetComponent<MeterComponent>()) {
|
if (auto meter = entities.back()->GetComponent<MeterComponent>()) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue