Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/QuestGuide_HS16/src/modules/waypoints/Waypoint.cc @ 11309

Last change on this file since 11309 was 11309, checked in by ooguz, 7 years ago

Distance Trigger base methods

File size: 1.3 KB
Line 
1#include "Waypoint.h"
2
3#include <OgreSceneNode.h>
4#include <BulletDynamics/Dynamics/btRigidBody.h>
5#include "util/OrxAssert.h"
6#include "core/CoreIncludes.h"
7#include "core/XMLPort.h"
8
9
10namespace orxonox
11
12
13{
14    RegisterClass(Waypoint);
15
16    Waypoint::Waypoint(Context* context) : StaticEntity(context)
17    {
18        RegisterObject(Waypoint);
19        model = new Model(this->getContext());
20        model->setMeshSource("cube.mesh");  // Name of the arrow file for now bottle
21        this->attach(model);
22        model->setScale(3);
23        //model->setOrientation(Vector3(0,0,-1));
24        model->setPosition(Vector3(0.0,0.0,0.0));        // this is wrong, it has to be triggered
25        waypoint_actived = false;
26        distancetrigger = new DistanceTrigger(this->getContext());   
27        distancetrigger->setDistance(100);
28        distanceTrigger_->addTarget("Pawn");
29         this->addEventSource(distanceTrigger_, "explode");
30
31        this->attach(distancetrigger);
32    }
33
34    Waypoint::~Waypoint()
35    {
36    }
37
38
39     //WorldEntity::setDirection
40     //WorldEntity::getPosition()
41     //setOrientation()
42
43
44    void Waypoint::XMLPort(Element& xmlelement, XMLPort::Mode mode){
45        SUPER(Waypoint, XMLPort, xmlelement, mode); // From the SpaceShip.cc file
46       
47        XMLPortParam(Waypoint, "order", setOrder, getOrder, xmlelement, mode);
48
49    }
50
51
52}
Note: See TracBrowser for help on using the repository browser.