Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 23, 2015, 4:19:02 PM (9 years ago)
Author:
meggiman
Message:

Implemented all necessary classes. No the weapon works without bugs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/weaponFS15/src/modules/weapons/projectiles/GravityBombField.cc

    r10369 r10391  
    77
    88#include "GravityBombField.h"
     9#include "graphics/Model.h"
    910
    1011namespace orxonox{
    1112        RegisterClass(GravityBombField);
    1213
    13         const float GravityBombField::FORCE_FIELD_LIFETIME = 5;
    14         const float GravityBombField::FORCE_SPHERE_START_RADIUS = 100;
    15         const float GravityBombField::FORCE_SPHERE_START_STRENGTH = -1000;
     14        const float GravityBombField::FORCE_FIELD_LIFETIME = 100;
     15        const float GravityBombField::FORCE_SPHERE_START_RADIUS = 500;
     16        const float GravityBombField::FORCE_SPHERE_START_STRENGTH = -500;
    1617
    1718        GravityBombField::GravityBombField(Context* context) : ForceField(context)
     
    2223                setDiameter(FORCE_SPHERE_START_RADIUS);
    2324                setMode(modeInvertedSphere_s);
     25                setCollisionResponse(false);
     26
     27                //Attach Demo Model for debuging.
     28                        Model* model = new Model(this->getContext());
     29                        model->setMeshSource("rocket.mesh"); //Demo Model from SimpleRocket
     30                        model->scale(0.7f);
     31                        this->attach(model);
    2432        }
    2533
     
    3240                if(lifetime_ < 0)
    3341                {
     42                        orxout(debug_output) << "Timeout. Destroying field." << endl;
    3443                        this->destroy();
    3544                }
Note: See TracChangeset for help on using the changeset viewer.