diff options
Diffstat (limited to 'src/game/game.cc')
-rw-r--r-- | src/game/game.cc | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/src/game/game.cc b/src/game/game.cc index 197700f..51bb565 100644 --- a/src/game/game.cc +++ b/src/game/game.cc @@ -108,26 +108,28 @@ bool Game::init() ship->label = "ship: Micron Vector"; core::Entity *cube = new core::Entity(core::entity::Solid & core::entity::Static); - cube->base_shape = core::entity::Cube; - cube->base_color = Color(0.0f, 0.8f, 0.0f); + cube->core_shape = core::entity::Cube; + cube->core_color = Color(0.0f, 0.8f, 0.0f); cube->location = Vector3f(24.0f, 0.0f, -24.0f); cube->label ="cube: Borg cube green"; + cube->type = cube_enttype; cube = new core::Entity(core::entity::Solid & core::entity::Static); - cube->base_shape = core::entity::Cube; - cube->base_color = Color(1.0f, 0.0f, 0.0f); + cube->core_shape = core::entity::Cube; + cube->core_color = Color(1.0f, 0.0f, 0.0f); cube->location = Vector3f(16.0f, 0.0f, -16.0f); cube->label ="cube: Borg cube red"; + cube->type = cube_enttype; core::Entity *sphere = new core::Entity(core::entity::Solid & core::entity::Static); - sphere->base_shape = core::entity::Sphere; - sphere->base_color = Color(0.8f, 0.8f, 0.0f); + sphere->core_shape = core::entity::Sphere; + sphere->core_color = Color(0.8f, 0.8f, 0.0f); sphere->location = Vector3f(0.0f, 0.0f, -32.0f); sphere->label ="sphere: The Sphere"; core::Entity *axis = new core::Entity(core::entity::Static); - axis->base_shape = core::entity::Diamond; - axis->base_color = Color(1.0f, 1.0f, 0.0f); + axis->core_shape = core::entity::Diamond; + axis->core_color = Color(1.0f, 1.0f, 0.0f); axis->location = Vector3f(0, 0, 0); axis->label = "axis: Origin"; @@ -152,4 +154,14 @@ void Game::frame(float seconds) ship->update(seconds); } +void Game::event_join(core::Player *player) +{ + if (!player) + return; + + ship = new Ship(); + ship->location = Vector3f(0,0,0); + ship->label = "ship: Micron Vector"; +} + }; // namespace game |