File: weapon_pulse.cpp

package info (click to toggle)
rafkill 1.2.2-3.3
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 13,268 kB
  • sloc: cpp: 13,508; makefile: 64; sh: 14
file content (45 lines) | stat: -rw-r--r-- 1,074 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include "hull.h"
#include "hulls/hull_weapon_pulse_nova.h"
#include "weaponobj.h"
#include "weapon_pulse.h"
#include "defs.h"
#include "explode.h"

Pulse::Pulse( int qx, int qy, double kx, double ky, HullObject * hnew, int al ):
WeaponNode(qx,qy,kx,ky,hnew, al){}

bool Pulse::Damage( double much ) {
	return false;
}


void Pulse::Collided( SpaceObject * who, ExplosionClass ** explr, int M_EX ) {
	addExplode( explr, M_EX, new ExplosionClass(getX(),getY(),0,0, Util::rnd(6) + 3 ) ); 
	if ( hull ) hull->Collided();
}


NovaPulse::NovaPulse(int qx, int qy, double kx, double ky, int al):
Pulse(qx,qy,kx,ky,new NovaPulse_WHull(), al ){}
	
void NovaPulse::MoveMe( vector< SpaceObject * > * Ammo, const vector< SpaceObject * > * fight, Section * onscreen ){
	setDY( getDY() - 0.20 );
	MoveReal();
	if ( hull ) hull->Moved( getDX(), getDY(), getAccelX(), getAccelY() );
}

/*
void NovaPulse::MoveReal() {

	// dy -= 0.02;
	setDY( getDY() - 0.30 );
	SpaceObject::MoveReal();
	/ *
	virtualx += dx;
	virtualy += dy;
	actualx = (int)virtualx;
	actualy = (int)virtualy;
	* /

}
*/