Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 28, 2008, 10:13:58 PM (16 years ago)
Author:
landauf
Message:
  • added CommandExecutor
  • added ConsoleCommand macros
  • added getTypename to all MultiTypes
  • added 2 static maps to Identifier that contain all existing Identifiers with their names and lowercase names respectively.
  • added 2 maps to each Identifier that contain all console commands of the Identifier with their names and lowercase names respectively
  • using tolower(.) and toupper(.) instead of selfmade hacks in String.h
  • added AccessLevel enum
  • added some test-console-commands to OutputHandler, Ambient and SpaceShip
Location:
code/branches/core2/src/orxonox/objects
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core2/src/orxonox/objects/Ambient.cc

    r902 r947  
    4141#include "../Orxonox.h"
    4242#include "core/XMLPort.h"
     43#include "core/ConsoleCommand.h"
    4344
    4445#include "Ambient.h"
     
    4647namespace orxonox
    4748{
     49    ConsoleCommand(Ambient, setAmbientLightTest, AccessLevel::Offline, false);
     50
    4851    CreateFactory(Ambient);
     52
     53    Ambient* Ambient::instance_s;
    4954
    5055    Ambient::Ambient()
    5156    {
    5257        RegisterObject(Ambient);
     58        Ambient::instance_s = this;
    5359    }
    5460
  • code/branches/core2/src/orxonox/objects/Ambient.h

    r902 r947  
    1818            void setAmbientLight(const ColourValue& colour);
    1919
     20            static void setAmbientLightTest(const ColourValue& colour)
     21                { Ambient::instance_s->setAmbientLight(colour); }
     22
    2023        private:
    21 
     24            static Ambient* instance_s;
    2225
    2326    };
  • code/branches/core2/src/orxonox/objects/SpaceShip.cc

    r902 r947  
    4545#include "Projectile.h"
    4646#include "core/XMLPort.h"
     47#include "core/ConsoleCommand.h"
    4748
    4849#include "SpaceShip.h"
     
    5051namespace orxonox
    5152{
     53    ConsoleCommand(SpaceShip, setMaxSpeedTest, AccessLevel::Debug, false);
     54
    5255    CreateFactory(SpaceShip);
    5356
     57    SpaceShip* SpaceShip::instance_s;
     58
    5459    SpaceShip::SpaceShip()
    5560    {
    5661        RegisterObject(SpaceShip);
     62
     63        SpaceShip::instance_s = this;
    5764
    5865        this->setConfigValues();
  • code/branches/core2/src/orxonox/objects/SpaceShip.h

    r902 r947  
    3636            void setRotDamp(float value);
    3737
     38            static void setMaxSpeedTest(float value)
     39                { SpaceShip::instance_s->setMaxSpeed(value); }
     40
    3841            bool mouseMoved(const OIS::MouseEvent &e);
    3942            bool mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id);
     
    4245
    4346        private:
     47            static SpaceShip* instance_s;
     48
    4449            Vector3 testvector_;
    4550            bool bInvertYAxis_;
Note: See TracChangeset for help on using the changeset viewer.