forked from tas/major_tom
Add moon surface intro level with asteroid hazards and unarmed mechanics
Introduce moon01.lvl as the starting level — a pure jump-and-run intro with no gun and no enemies, just platforming over gaps and dodging falling asteroids. The player picks up their gun upon transitioning to level01. New features: - Moon tileset and PARALLAX_STYLE_MOON with crater terrain backgrounds - Asteroid entity (ENT_ASTEROID): falls from sky, damages on contact, explodes on ground with particles, respawns after delay - PLAYER_UNARMED directive disables gun for the level - Pit rescue mechanic: falling costs 1 HP and auto-dashes upward - Gun powerup entity type for future armed-pickup levels - Segment-based procedural level generator with themed rooms - Extended editor with entity palette and improved tile cycling - Web shell improvements for Emscripten builds
This commit is contained in:
@@ -14,6 +14,10 @@ typedef struct Level {
|
||||
Parallax parallax;
|
||||
Music music;
|
||||
bool music_started;
|
||||
|
||||
/* ── Exit / transition state ─────────── */
|
||||
bool exit_triggered; /* player entered an exit zone */
|
||||
char exit_target[ASSET_PATH_MAX]; /* target level path */
|
||||
} Level;
|
||||
|
||||
bool level_load(Level *level, const char *path);
|
||||
@@ -22,4 +26,8 @@ void level_update(Level *level, float dt);
|
||||
void level_render(Level *level, float interpolation);
|
||||
void level_free(Level *level);
|
||||
|
||||
/* Returns true if the player has triggered a level exit.
|
||||
* The target path is stored in level->exit_target. */
|
||||
bool level_exit_triggered(const Level *level);
|
||||
|
||||
#endif /* JNR_LEVEL_H */
|
||||
|
||||
Reference in New Issue
Block a user