Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 13, 2006, 3:19:40 PM (18 years ago)
Author:
marcscha
Message:

weapon, collision, particles

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/playability/src/world_entities/projectiles/swarm_projectile.cc

    r10039 r10064  
    2323#include "particles/dot_emitter.h"
    2424#include "particles/sprite_particles.h"
     25#include "space_ships/space_ship.h"
    2526
    2627#include "debug.h"
     
    4445  this->setMinEnergy(1);
    4546  this->setHealthMax(10);
    46   this->lifeSpan = 2.0;
     47  this->lifeSpan = 4.0;
    4748  this->agility = 3.5;
    4849  this->maxVelocity = 100;
     
    6465SwarmProjectile::~SwarmProjectile ()
    6566{
    66   // delete this->emitter;
     67
    6768
    6869  /* this is normaly done by World.cc by deleting the ParticleEngine */
     
    7980    SwarmProjectile::explosionParticles = NULL;
    8081  }
    81 
     82   delete this->emitter;
    8283}
    8384
     
    9697    SwarmProjectile::trailParticles->setLifeSpan(1.0, .3);
    9798    SwarmProjectile::trailParticles->setRadius(0.0, .5);
    98     SwarmProjectile::trailParticles->setRadius(0.2, 4.0);
    99     SwarmProjectile::trailParticles->setRadius(.5, 1.5);
    100     SwarmProjectile::trailParticles->setRadius(1.0, 1.5);
     99    SwarmProjectile::trailParticles->setRadius(0.2, 2.0);
     100    SwarmProjectile::trailParticles->setRadius(.5, 1.0);
     101    SwarmProjectile::trailParticles->setRadius(1.0, 0.6);
    101102    SwarmProjectile::trailParticles->setColor(0.0, 1,0,0,.7);
    102103    SwarmProjectile::trailParticles->setColor(0.2, .8,.8,0,.5);
     
    145146    this->destroy( entity );
    146147  this->hitEntity = entity;
     148  dynamic_cast<SpaceShip*>(entity)->damage(this->getDamage(),0);
    147149}
    148150
Note: See TracChangeset for help on using the changeset viewer.