- Removed the Threshold Key/hazard door/stairwell exit, anchors, events and HUD text - Added an aged 40%-larger Beacon GLB and a reproducible Blender generator - Added BeaconSystem: three walk-over beacons, grey->bright-red Hiss-wave activation - Added cheap plinth collision and a placeholder completion event/banner - Added a beacon QA flag, validation, tests and design notes
37 lines
1.1 KiB
C++
37 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include <vector>
|
|
|
|
#include "core/events.hpp"
|
|
#include "game/floor.hpp"
|
|
|
|
// Walk-to-activate objectives that replace the old key/door exit flow.
|
|
// The three beacons are authored as PropKind::Beacon props in the level; the
|
|
// third activation emits a placeholder event (its effect is still to be
|
|
// designed). Proximity only — no interact key, matching the other rituals.
|
|
class BeaconSystem {
|
|
public:
|
|
struct BeaconState {
|
|
Vec2 pos{};
|
|
float yaw = 0.0f;
|
|
float scale = 1.0f;
|
|
bool active = false;
|
|
};
|
|
|
|
static constexpr float kActivationRadius = 2.5f;
|
|
static constexpr int kCount = 3;
|
|
|
|
void init(const Floor& floor);
|
|
void reset();
|
|
void update(Vec2 player_pos, EventQueue& events);
|
|
|
|
int active_count() const { return active_count_; }
|
|
int count() const { return static_cast<int>(beacons_.size()); }
|
|
bool complete() const { return count() >= kCount && active_count_ >= kCount; }
|
|
const std::vector<BeaconState>& beacons() const { return beacons_; }
|
|
|
|
private:
|
|
std::vector<BeaconState> beacons_;
|
|
int active_count_ = 0;
|
|
bool complete_fired_ = false;
|
|
};
|