Last change
on this file since 10336 was
10336,
checked in by meggiman, 9 years ago
|
Started implementing GravityBomb.cc
|
File size:
1.0 KB
|
Line | |
---|
1 | /* |
---|
2 | * GravityBomb.cc |
---|
3 | * |
---|
4 | * Created on: Mar 26, 2015 |
---|
5 | * Author: meggiman |
---|
6 | */ |
---|
7 | #include "GravityBomb.h" |
---|
8 | |
---|
9 | |
---|
10 | namespace orxonox{ |
---|
11 | RegisterClass(GravityBomb); |
---|
12 | |
---|
13 | const float GravityBomb::FUEL_START = 10; |
---|
14 | const float GravityBomb::FORCE_SPHERE_START_RADIUS = 30; |
---|
15 | const float GravityBomb::FORCE_SPHERE_START_STRENGTH = 100; |
---|
16 | |
---|
17 | GravityBomb::GravityBomb(Context* context): |
---|
18 | BasicProjectile(), |
---|
19 | MovableEntity(context), |
---|
20 | RadarViewable(this,static_cast<WorldEntity*>(this)) |
---|
21 | { |
---|
22 | RegisterObject(GravityBomb); |
---|
23 | this->lifetime_=FUEL_START; |
---|
24 | this->forceSphereRadius_= FORCE_SPHERE_START_RADIUS; |
---|
25 | this->forceStrength_ = FORCE_SPHERE_START_STRENGTH; |
---|
26 | |
---|
27 | ForceField* field = new ForceField(context); |
---|
28 | field->setMode("sphere"); |
---|
29 | field->setDiameter(this->forceSphereRadius_); |
---|
30 | field->setVelocity(this->forceStrength_); |
---|
31 | this->attach(field); |
---|
32 | |
---|
33 | } |
---|
34 | |
---|
35 | GravityBomb::~GravityBomb(){} |
---|
36 | |
---|
37 | void GravityBomb::tick(float dt) |
---|
38 | { |
---|
39 | |
---|
40 | } |
---|
41 | |
---|
42 | bool GravityBomb::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint) |
---|
43 | { |
---|
44 | return true; |
---|
45 | } |
---|
46 | } |
---|
47 | |
---|
48 | |
---|
Note: See
TracBrowser
for help on using the repository browser.