Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5495 in orxonox.OLD for trunk/src


Ignore:
Timestamp:
Nov 6, 2005, 3:04:08 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: revision should be visible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/weapons/rocket.cc

    r5479 r5495  
    2727#include "particle_emitter.h"
    2828#include "particle_system.h"
     29#include "text.h"
    2930
    3031
     
    3233
    3334CREATE_FAST_FACTORY_STATIC(Rocket, CL_ROCKET);
     35
     36unsigned int Points = 0;
     37Text* pointsText = NULL;
     38
    3439
    3540/**
     
    6772      delete Rocket::trailParticles;
    6873    Rocket::trailParticles = NULL;
     74    Points = 0;
     75    delete pointsText;
     76    pointsText = NULL;
    6977  }
    7078  if (Rocket::explosionParticles != NULL && ClassList::getList(CL_TEST_BULLET)->getSize() <= 1)
     
    97105    Rocket::trailParticles->setColor(0.5, .8,.8,.8,.8);
    98106    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
    99114  }
    100115  if (unlikely(Rocket::explosionParticles == NULL))
     
    135150{
    136151  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);
    137157    this->destroy();
     158  }
    138159  this->hitEntity = entity;
    139160}
Note: See TracChangeset for help on using the changeset viewer.