mirror of
https://github.com/devZoGok/PlanetFleet.git
synced 2026-08-27 03:53:33 +00:00
17 lines
475 B
C++
Executable File
17 lines
475 B
C++
Executable File
#include <model.h>
|
|
|
|
#include "torpedo.h"
|
|
|
|
using namespace vb01;
|
|
|
|
namespace battleship{
|
|
Torpedo::Torpedo(Unit *unit, Vector3 pos, Vector3 dir, Vector3 left, Vector3 up, int id, int weaponTypeId, int weaponId) :
|
|
Projectile(unit, nullptr, pos, dir, left, up, id,weaponTypeId,weaponId) {this->damage = 50;}
|
|
|
|
void Torpedo::update() {
|
|
Projectile::update();
|
|
pos = pos + dirVec * speed;
|
|
node->setPosition(pos);
|
|
}
|
|
}
|