Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/example/example.cc')
-rw-r--r--src/game/example/example.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/game/example/example.cc b/src/game/example/example.cc
index 9d4c1ed..f368556 100644
--- a/src/game/example/example.cc
+++ b/src/game/example/example.cc
@@ -43,9 +43,9 @@ Example::Example() : core::Module("The Osirion Project Example", true)
cube->set_label("cube");
cube->set_name("The Red Cube");
cube->entity_shape = core::Entity::Cube; // set the shape to cube
- cube->get_location().assign(16, -8, 0); // set location
+ cube->get_location().assign(16, -8, 0); // set location
cube->get_color().assign(1, 0, 0); // set RGB color red
- cube->entity_radius = 0.25f; // set radius, in game units
+ cube->set_radius(0.25f); // set radius, in game units
cube->set_zone(zone); // add the entity to the zone
core::Entity *sphere = new core::Entity(); // a new entity
@@ -54,7 +54,7 @@ Example::Example() : core::Module("The Osirion Project Example", true)
sphere->entity_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
- sphere->entity_radius = 0.25f; // set radius, in game units
+ cube->set_radius(0.25f); // set radius, in game units
sphere->set_zone(zone); // add the entity to the zone
core::Entity *diamond = new core::Entity(); // a new entity
@@ -63,7 +63,7 @@ Example::Example() : core::Module("The Osirion Project Example", true)
diamond->entity_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
- diamond->entity_radius = 0.25f; // set radius, in game units
+ cube->set_radius(0.25f); // set radius, in game units
diamond->set_zone(zone); // add the entity to the zone
core::Entity *axis = new core::Entity(); // a new entity
@@ -73,7 +73,7 @@ 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
- axis->entity_radius = 0.25f; // set radius, in game units
+ cube->set_radius(0.25f); // set radius, in game units
axis->set_zone(zone); // add the entity to the zone
}