Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11258 for code


Ignore:
Timestamp:
Oct 31, 2016, 4:06:17 PM (8 years ago)
Author:
ooguz
Message:

einige Anderungen

Location:
code/branches/QuestGuide_HS16/src/orxonox/worldentities
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/QuestGuide_HS16/src/orxonox/worldentities/Waypoint.cc

    r11243 r11258  
    1515        model = new Model(this->getContext());
    1616        model->setMeshSource("cube.mesh");  // Name of the arrow file for now bottle
     17        this->attach(model);
    1718        model->setScale(3);
    1819        //model->setOrientation(Vector3(0,0,-1));
    19         model->setPosition(this->getPosition());        // this is wrong, it has to be triggered
     20        model->setPosition(Vector3(0.0,0.0,0.0));        // this is wrong, it has to be triggered
     21        waypoint_active = false;
     22        distancetrigger = new DistanceTrigger(this->getContext());   
     23        distancetrigger->setDistance(100);
     24        this->attach(distancetrigger);
    2025    }
    2126
     
    2530
    2631
    27      WorldEntity::setDirection
    28      WorldEntity::getPosition()
    29      setOrientation()
     32     //WorldEntity::setDirection
     33     //WorldEntity::getPosition()
     34     //setOrientation()
    3035
    3136
    3237    void Waypoint::XMLPort(Element& xmlelement, XMLPort::Mode mode){
    3338        SUPER(Waypoint, XMLPort, xmlelement, mode); // From the SpaceShip.cc file
    34         //XMLPortObject(SpaceShip, Engine, "engines", addEngine, getEngine, xmlelement, mode); // TRY ADDING THE WAYPOINT ARROW LIKE AN ENGINE
    35  
     39        XMLPortParam(Waypoint, "order", getOrder, setOrder, xmlelement, mode);
    3640
    3741    }
  • code/branches/QuestGuide_HS16/src/orxonox/worldentities/Waypoint.h

    r11243 r11258  
    77#include "StaticEntity.h"
    88#include "graphics/Model.h"
     9#include "modules/objects/triggers/DistanceTrigger.h"
    910
    1011#include <map>
     
    3839            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    3940
     41            inline void enable_waypoint(){
     42                this->waypoint_active = true;
     43            }
     44
     45            inline void disable_waypoint(){
     46                this->waypoint_active = false;
     47            }
     48
     49            inline int getOrder(){
     50                return order;
     51            }
     52
     53           
    4054
    4155
     
    4458            //virtual bool isCollisionTypeLegal(CollisionType type) const override;
    4559            Model* model;
     60            DistanceTrigger* distancetrigger;
     61            bool waypoint_active;
     62            int order;
    4663           
    4764            // network callbacks
  • code/branches/QuestGuide_HS16/src/orxonox/worldentities/Waypointarrow.cc

    r11243 r11258  
    1 #include "Waypoint.h"
     1#include "Waypointarrow.h"
    22
    33#include <OgreSceneNode.h>
     
    1414        RegisterObject(Waypointarrow);
    1515        model = new Model(this->getContext());
    16         model->setMeshSource("axes.mesh");  // Name of the arrow file for now bottle
     16        model->setMeshSource("cokebottle.mesh");  // Name of the arrow file for now bottle
    1717        this->attach(model);
    1818        model->setScale(3);
  • code/branches/QuestGuide_HS16/src/orxonox/worldentities/Waypointarrow.h

    r11243 r11258  
    2929    */
    3030
    31     class _OrxonoxExport Waypoint : public StaticEntity {
     31    class _OrxonoxExport Waypointarrow : public StaticEntity {
    3232       
    3333        public:
Note: See TracChangeset for help on using the changeset viewer.