33#define kPlasmaShotSize 12.0f
34#define kPlasmaShotActivationDelay 0.05f
41#define PLASMA_ATTENUATION 0
46- (id) initWithPosition:(HPVector)inPosition
47 velocity:(Vector)inVelocity
48 energy:(
float)inEnergy
54 [
self setPosition:inPosition];
55 [
self setVelocity:inVelocity];
56 [
self setCollisionRadius:2.0];
58 [
self setColor:color alpha:1.0];
61 [
self setEnergy:inEnergy];
75- (BOOL) checkCloseCollisionWith:(
Entity *)other
81- (void) update:(
double)delta_t
83 [
super update:delta_t];
85 OOTimeDelta lifeTime = [
self timeElapsedSinceSpawn];
88 float attenuation = OOClamp_0_1_f(1.0f - lifeTime /
_duration);
90 const float attenuation = 1.0f;
93 NSUInteger i,
count = [collidingEntities count];
94 for (i = 0; i <
count; i++)
105 [UNIVERSE removeEntity:self];
109 [UNIVERSE addEntity:burst];
114#if PLASMA_ATTENUATION
#define kPlasmaShotActivationDelay
NSMutableArray * collidingEntities
ShipEntity * rootShipEntity()
void takeEnergyDamage:from:becauseOf:weaponIdentifier:(double amount,[from] Entity *ent,[becauseOf] Entity *other,[weaponIdentifier] NSString *weaponIdentifier)
GLfloat _colorComponents[4]