mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-09-17 01:21:19 +00:00
ru:: implemented a room_mod: reflector
This commit is contained in:
@@ -114,6 +114,7 @@ struct room {
|
||||
int timed_orb_end;
|
||||
|
||||
vector<unique_ptr<struct entity>> entities;
|
||||
vector<unique_ptr<struct room_mod>> room_mods;
|
||||
|
||||
eWall at(int x, int y) {
|
||||
return eWall(block_at[y][x] >> 3);
|
||||
@@ -580,6 +581,17 @@ struct fakesaw : public saw {
|
||||
void act() override;
|
||||
};
|
||||
|
||||
struct room_mod {
|
||||
virtual void draw() {}
|
||||
virtual void act() {}
|
||||
};
|
||||
|
||||
struct reflector : public room_mod {
|
||||
xy pos1, pos2;
|
||||
void draw() override;
|
||||
void act() override;
|
||||
};
|
||||
|
||||
/* entities with a defined 'respawn' location */
|
||||
struct located_entity : public entity {
|
||||
xy respawn;
|
||||
|
||||
Reference in New Issue
Block a user