Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2010-11-12 14:43:49 +0000
committerStijn Buys <ingar@osirion.org>2010-11-12 14:43:49 +0000
commitc0c2a0ccc335b00983bf69b99b7a44505ed24b47 (patch)
treeaed98bf43957595104810e6ba7d1ab278d2e8089 /src/game/example
parentd07d7e0d0ba022d555f418e9a072d71c190ed225 (diff)
made core::Entity::entity_shape a private attribute
Diffstat (limited to 'src/game/example')
-rw-r--r--src/game/example/example.cc8
-rw-r--r--src/game/example/spectator.cc2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/game/example/example.cc b/src/game/example/example.cc
index a6372da..7ad39b2 100644
--- a/src/game/example/example.cc
+++ b/src/game/example/example.cc
@@ -43,7 +43,7 @@ Example::Example() : core::Module("The Osirion Project Example", true)
core::Entity *cube = new core::Entity(); // a new entity
cube->set_label("cube");
cube->set_name("The Red Cube");
- cube->entity_shape = core::Entity::Cube; // set the shape to cube
+ cube->set_shape(core::Entity::Cube); // set the shape to cube
cube->get_location().assign(16, -8, 0); // set location
cube->get_color().assign(1, 0, 0); // set RGB color red
cube->set_radius(0.25f); // set radius, in game units
@@ -52,7 +52,7 @@ Example::Example() : core::Module("The Osirion Project Example", true)
core::Entity *sphere = new core::Entity(); // a new entity
sphere->set_label("sphere");
sphere->set_name("The Green Sphere");
- sphere->entity_shape = core::Entity::Sphere; // set the shape to sphere
+ 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
@@ -61,7 +61,7 @@ Example::Example() : core::Module("The Osirion Project Example", true)
core::Entity *diamond = new core::Entity(); // a new entity
diamond->set_label("diamond");
diamond->set_name("The Blue Diamond");
- diamond->entity_shape = core::Entity::Diamond; // set the shape to cube
+ 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
@@ -70,7 +70,7 @@ Example::Example() : core::Module("The Osirion Project Example", true)
core::Entity *axis = new core::Entity(); // a new entity
axis->set_label("origin");
axis->set_name("The Origin");
- axis->entity_shape = core::Entity::Axis; // set the shape to axis
+ axis->set_shape(core::Entity::Axis); // set the shape to axis
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
diff --git a/src/game/example/spectator.cc b/src/game/example/spectator.cc
index defc356..5fc7fc6 100644
--- a/src/game/example/spectator.cc
+++ b/src/game/example/spectator.cc
@@ -15,7 +15,7 @@ core::Cvar *Spectator::g_spectatorrotation = 0;
Spectator::Spectator(core::Player *owner) : core::EntityControlable()
{
// default properties
- entity_shape = core::Entity::Diamond;
+ set_shape(core::Entity::Diamond);
set_radius(0.25f);
// the spectator gets player color