Changeset 10511 in orxonox.OLD for trunk/src/world_entities
- Timestamp:
- Jan 30, 2007, 7:39:47 PM (18 years ago)
- Location:
- trunk/src/world_entities
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/creatures/fps_player.cc
r10487 r10511 341 341 if( this->bJump) 342 342 { 343 printf(" dummyvariable:( %f, %f, %f) \n", this->getAbsCoorX(), this->getAbsCoorY(), this->getAbsCoorZ() );343 printf("panicGuy:runTo( %f, %f, %f ) \n", this->getAbsCoorX(), this->getAbsCoorY(), this->getAbsCoorZ() ); 344 344 this->bJump = false; 345 345 } -
trunk/src/world_entities/effects/blink.cc
r10491 r10511 63 63 64 64 this->bBoard = new Billboard; 65 this->bBoard->setVisibili y(true);65 this->bBoard->setVisibility(true); 66 66 this->bBoard->setTexture("textures/light/blink.png"); 67 67 -
trunk/src/world_entities/effects/trail.cc
r10368 r10511 94 94 95 95 this->setAbsCoor(0, 0, 0); 96 this->setVisibili y(true);96 this->setVisibility(true); 97 97 98 98 this->nodeList[0] = (this->getAbsCoor()); -
trunk/src/world_entities/npcs/generic_npc.cc
r10415 r10511 48 48 ->addMethod("playAnimation", Executor2<GenericNPC, lua_State*,int,int>(&GenericNPC::playAnimation)) 49 49 // Display 50 ->addMethod("hide", Executor0<WorldEntity, lua_State*>(&WorldEntity::hide)) 51 ->addMethod("unhide", Executor0<WorldEntity, lua_State*>(&WorldEntity::unhide)) 50 ->addMethod("setVisibility", Executor1<WorldEntity, lua_State*, bool>(&WorldEntity::setVisibility)) 52 51 // Coordinates 53 52 ->addMethod("getAbsCoorX", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorX)) -
trunk/src/world_entities/npcs/npc.cc
r10501 r10511 65 65 ->addMethod("fire", Executor0<NPC, lua_State*>(&NPC::fire)) 66 66 ->addMethod("pause", Executor1<WorldEntity, lua_State*, bool>(&WorldEntity::pauseTrack)) 67 ->addMethod("hide", Executor0<WorldEntity, lua_State*>(&WorldEntity::hide)) 68 ->addMethod("unhide", Executor0<WorldEntity, lua_State*>(&WorldEntity::unhide)) 67 ->addMethod("setVisibility", Executor1<WorldEntity, lua_State*, bool>(&WorldEntity::setVisibility)) 69 68 ); 70 69 -
trunk/src/world_entities/projectiles/acid_splash.cc
r10502 r10511 54 54 this->grid = new Wobblegrid( 5); 55 55 this->grid->setParent( this); 56 this->grid->setVisibili y(false);56 this->grid->setVisibility(false); 57 57 58 58 … … 99 99 this->toList(OM_ENVIRON); 100 100 // this->unhide(); 101 this->grid->setVisibili y(true);101 this->grid->setVisibility(true); 102 102 103 103 this->setPhysDamage(10); … … 112 112 113 113 // this->hide(); 114 this->grid->setVisibili y(false);114 this->grid->setVisibility(false); 115 115 this->lifeCycle = 0.0; 116 116 this->toList(OM_NULL); -
trunk/src/world_entities/projectiles/hbolt.cc
r10505 r10511 59 59 this->halo->setSize(.65, .65); 60 60 this->halo->setTexture("hbolt_halo2.png"); 61 this->halo->setVisibili y(false);61 this->halo->setVisibility(false); 62 62 63 63 } … … 86 86 void HBolt::activate() 87 87 { 88 this->halo->setVisibili y(true);88 this->halo->setVisibility(true); 89 89 this->origList = this->getOMListNumber(); 90 90 this->toList(OM_ENVIRON); … … 109 109 void HBolt::deactivate() 110 110 { 111 this->halo->setVisibili y(false);111 this->halo->setVisibility(false); 112 112 assert (HBolt::explosionParticles != NULL); 113 113 HBolt::explosionParticles->removeEmitter(this->emitter); -
trunk/src/world_entities/projectiles/lbolt.cc
r10505 r10511 62 62 this->halo->setSize(.35, .35); 63 63 this->halo->setTexture("hbolt_halo.png"); 64 this->halo->setVisibili y(false);64 this->halo->setVisibility(false); 65 65 66 66 … … 90 90 void LBolt::activate() 91 91 { 92 this->halo->setVisibili y(true);92 this->halo->setVisibility(true); 93 93 this->origList = this->getOMListNumber(); 94 94 this->toList(OM_ENVIRON); … … 115 115 assert (LBolt::explosionParticles != NULL); 116 116 LBolt::explosionParticles->removeEmitter(this->emitter); 117 this->halo->setVisibili y(false);117 this->halo->setVisibility(false); 118 118 this->lifeCycle = 0.0; 119 119 -
trunk/src/world_entities/projectiles/spike_ball.cc
r10505 r10511 60 60 this->halo->setSize(2, 2); 61 61 this->halo->setTexture("hbolt_halo.png"); 62 this->halo->setVisibili y(false);62 this->halo->setVisibility(false); 63 63 64 64 this->setFragments(26); … … 95 95 void SpikeBall::activate() 96 96 { 97 this->halo->setVisibili y(true);97 this->halo->setVisibility(true); 98 98 if (unlikely(SpikeBall::explosionParticles == NULL)) 99 99 { … … 142 142 void SpikeBall::deactivate() 143 143 { 144 this->halo->setVisibili y(false);144 this->halo->setVisibility(false); 145 145 assert (SpikeBall::explosionParticles != NULL); 146 146 //SpikeBall::explosionParticles->removeEmitter(this->emitter); -
trunk/src/world_entities/weather_effects/lightning_effect.cc
r10415 r10511 107 107 this->thunderBolt[i] = new Billboard(NULL); 108 108 this->thunderBolt[i]->setSize(this->width, this->height); 109 this->thunderBolt[i]->setVisibili y(false);109 this->thunderBolt[i]->setVisibility(false); 110 110 } 111 111 … … 176 176 int i; 177 177 for (i = 0; i < 4; i++) 178 this->thunderBolt[i]->setVisibili y(false);178 this->thunderBolt[i]->setVisibility(false); 179 179 180 180 } … … 197 197 198 198 // Start a flash & lightning cycle 199 this->thunderBolt[0]->setVisibili y(true);199 this->thunderBolt[0]->setVisibility(true); 200 200 201 201 // Lighten up environment … … 209 209 210 210 if( this->thunderBolt[0]->isVisible() && this->time > this->flashRisingTime*1/3 ) { 211 this->thunderBolt[0]->setVisibili y(false);212 this->thunderBolt[1]->setVisibili y(true);211 this->thunderBolt[0]->setVisibility(false); 212 this->thunderBolt[1]->setVisibility(true); 213 213 } else if( this->thunderBolt[1]->isVisible() && this->time > this->flashRisingTime*2/3 ) { 214 this->thunderBolt[1]->setVisibili y(false);215 this->thunderBolt[2]->setVisibili y(true);214 this->thunderBolt[1]->setVisibility(false); 215 this->thunderBolt[2]->setVisibility(true); 216 216 217 217 } else if( this->thunderBolt[2]->isVisible() && this->time > this->flashRisingTime) { 218 this->thunderBolt[2]->setVisibili y(false);219 this->thunderBolt[3]->setVisibili y(true);218 this->thunderBolt[2]->setVisibility(false); 219 this->thunderBolt[3]->setVisibility(true); 220 220 } 221 221 222 222 if( this->thunderBolt[3]->isVisible() && this->time > this->flashHoldTime) { 223 this->thunderBolt[3]->setVisibili y(false);223 this->thunderBolt[3]->setVisibility(false); 224 224 225 225 this->time = 0.0f; -
trunk/src/world_entities/world_entity.cc
r10498 r10511 717 717 void WorldEntity::draw(const Model* model) const 718 718 { 719 if(bVisible) 720 { 719 721 glMatrixMode(GL_MODELVIEW); 720 722 glPushMatrix(); … … 733 735 734 736 glPopMatrix(); 737 } 735 738 } 736 739 -
trunk/src/world_entities/world_entity.h
r10498 r10511 64 64 65 65 /** @param visibility if the Entity should be visible (been draw) */ 66 void setVisibili y (bool visibility) { this->bVisible = visibility; };66 void setVisibility (bool visibility) { this->bVisible = visibility; }; 67 67 /** @returns true if the entity is visible, false otherwise */ 68 68 inline bool isVisible() const { return this->bVisible; };
Note: See TracChangeset
for help on using the changeset viewer.