diff options
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/example/example.cc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/game/example/example.cc b/src/game/example/example.cc index 7ad39b2..8e1a1ac 100644 --- a/src/game/example/example.cc +++ b/src/game/example/example.cc @@ -33,6 +33,7 @@ Example::Example() : core::Module("The Osirion Project Example", true) */ zone = new core::Zone("example"); // create a Zone object zone->set_name("Example Zone"); // set the zone name + zone->set_ambient_color(0.5f, 0.5f, 0.5f); // set the zone ambient light color core::Zone::add(zone); // add the zone to the world /* @@ -48,6 +49,7 @@ Example::Example() : core::Module("The Osirion Project Example", true) cube->get_color().assign(1, 0, 0); // set RGB color red cube->set_radius(0.25f); // set radius, in game units cube->set_zone(zone); // add the entity to the zone + cube->set_flag(core::Entity::ShowOnMap); // entity appears on the map core::Entity *sphere = new core::Entity(); // a new entity sphere->set_label("sphere"); @@ -55,8 +57,10 @@ Example::Example() : core::Module("The Osirion Project Example", true) sphere->set_shape(core::Entity::Sphere); // set the shape to sphere sphere->get_location().assign(16, 0, 0); // set location sphere->get_color().assign(0, 1, 0); // set RGB color green - cube->set_radius(0.25f); // set radius, in game units + sphere->set_radius(0.5f); // set radius, in game units sphere->set_zone(zone); // add the entity to the zone + sphere->set_flag(core::Entity::ShowOnMap); // entity appears on the map + core::Entity *diamond = new core::Entity(); // a new entity diamond->set_label("diamond"); @@ -64,8 +68,10 @@ Example::Example() : core::Module("The Osirion Project Example", true) diamond->set_shape(core::Entity::Diamond); // set the shape to cube diamond->get_location().assign(16, 8, 0); // set location diamond->get_color().assign(0, 0, 1); // set RGB color blue - cube->set_radius(0.25f); // set radius, in game units - diamond->set_zone(zone); // add the entity to the zone + diamond->set_radius(0.25f); // set radius, in game units + diamond->set_zone(zone); // add the entity to the zone + diamond->set_flag(core::Entity::ShowOnMap); // entity appears on the map + core::Entity *axis = new core::Entity(); // a new entity axis->set_label("origin"); @@ -74,8 +80,9 @@ Example::Example() : core::Module("The Osirion Project Example", true) axis->get_location().assign(0, 0, 0); // set location axis->get_color().assign(1); // set greyscale color white axis->get_color_second().assign(0.5f, 0.0f, 0.5f); // set RGB secondary color - cube->set_radius(0.25f); // set radius, in game units + axis->set_radius(0.25f); // set radius, in game units axis->set_zone(zone); // add the entity to the zone + axis->set_flag(core::Entity::ShowOnMap); // entity appears on the map } |