File: gun_fire.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 (23 lines) | stat: -rw-r--r-- 602 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
#include "gunobj.h"
#include "weaponobj.h"
#include "gun_fire.h"
#include "hulls/hull_weapon_fire.h"
#include "spaceobj.h"
#include <vector>

using namespace std;

WeaponFire::WeaponFire( int z, int d, int al ):
WeaponObject( d, "Fire", 12000, al, z, 0 ) {
}


WeaponObject * WeaponFire::copy() {
	return new WeaponFire( strength, dir, alignment );
}

void WeaponFire::MakeShot(int x, int y, vector< SpaceObject * > * Ammo, const vector< SpaceObject * > * fight ) {
	const double speed = 9.5;
	shot_counter = 35;
	Ammo->push_back( new WeaponNode(x-7,y,0,dir * speed, new Fire_WHull(), alignment ) );
}