Changeset 5495 in orxonox.OLD for trunk/src/world_entities
- Timestamp:
- Nov 6, 2005, 3:04:08 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/weapons/rocket.cc
r5479 r5495 27 27 #include "particle_emitter.h" 28 28 #include "particle_system.h" 29 #include "text.h" 29 30 30 31 … … 32 33 33 34 CREATE_FAST_FACTORY_STATIC(Rocket, CL_ROCKET); 35 36 unsigned int Points = 0; 37 Text* pointsText = NULL; 38 34 39 35 40 /** … … 67 72 delete Rocket::trailParticles; 68 73 Rocket::trailParticles = NULL; 74 Points = 0; 75 delete pointsText; 76 pointsText = NULL; 69 77 } 70 78 if (Rocket::explosionParticles != NULL && ClassList::getList(CL_TEST_BULLET)->getSize() <= 1) … … 97 105 Rocket::trailParticles->setColor(0.5, .8,.8,.8,.8); 98 106 Rocket::trailParticles->setColor(1.0, .8,.8,.8,.0); 107 108 pointsText = new Text(); 109 pointsText->setAbsCoor2D(5, 100); 110 pointsText->setText("0"); 111 pointsText->setColor(1,0,0); 112 pointsText->setSize(50); 113 99 114 } 100 115 if (unlikely(Rocket::explosionParticles == NULL)) … … 135 150 { 136 151 if (this->hitEntity != entity && entity->isA(CL_NPC)) 152 { 153 Points += 807187088; 154 char pointTxt[50]; 155 sprintf(pointTxt, "points: %d", Points); 156 pointsText->setText(pointTxt); 137 157 this->destroy(); 158 } 138 159 this->hitEntity = entity; 139 160 }
Note: See TracChangeset
for help on using the changeset viewer.