Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 19, 2011, 4:16:55 PM (13 years ago)
Author:
kmaurus
Message:

third reactionMode added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/spaceboundaries2/src/orxonox/worldentities/SpaceBoundaries.h

    r8506 r8513  
    2727 */
    2828 
    29  /* TODO:   - Textmessages und Billboards sollen teils nur bei einem humanPlayer angezeigt werden, nicht bei allen (vgl. Netzwerk-Spiel mit mehreren humanPlayers)
     29 /* TODO:   - Bei Reaction_ == 2 ist die Reflexion noch nicht ganz so top!! Vielleicht auch so belassen, ist ja nicht unbedingt schlecht.
     30 
     31            - Textmessages und Billboards sollen teils nur bei einem humanPlayer angezeigt werden, nicht bei allen (vgl. Netzwerk-Spiel mit mehreren humanPlayers)
    3032                beachte hierzu folgende statische Funktion: 'static unsigned int  Host::getPlayerID()'
    3133                (file:///home/kmaurus/orxonox/spaceBoundaries/build/doc/api/html/classorxonox_1_1_host.html#9c1e3b39e3b42e467dfbf42902911ce2)
     
    6769                            0: Reflect the space ship (default).
    6870                            1: Decrease Health of the space ship after having left the allowed area.
     71                            2: Inverted Version of 0. Prohibit to fly INTO a defined area.
    6972       - 'healthDecrease' : a measure to define how fast the health of a pawn should decrease after leaving the allowed area (unnecessary if 'reactionMode' == 0).
    7073                            Recommended values: 0.1 (slow health decrease) to 5 (very fast health decrease)
     
    8891            SpaceBoundaries(BaseObject* creator);
    8992            ~SpaceBoundaries();
    90            
    91             void checkWhoIsIn(); //!< Update the list 'pawnsIn_'.
    92            
    93             void positionBillboard(const Vector3 position); //!< Display a Billboard at the position 'position'.
    94             void setBillboardOptions(Billboard *billy);
    95             void removeAllBillboards(); //!< Hide all elements of '*billboard_' and set their attribute 'usedYet' to 0.
    9693           
    9794            void setMaxDistance(float r);
     
    117114            struct billboardAdministration{ bool usedYet; Billboard* billy; };
    118115           
     116            // Variabeln::
    119117            std::list<WeakPtr<Pawn> > pawnsIn_; //!< List of the pawns that this instance of SpaceBoundaries has to handle.
    120118           
    121119            std::vector<billboardAdministration> billboards_;
    122120       
    123             int reaction_; //!< Werte: 0, 1. 0: Reflektion an Boundaries (Standard). 1: Health-Abzug-Modus.
     121            int reaction_; //!< Werte: 0, 1, 2.
     122                           //!< 0: Reflektion an Boundaries (Standard).
     123                           //!< 1: Health-Abzug-Modus.
     124                           //!< 2: Invertierte Version von 0. Verbiete es, in ein Gebiet hinein zu fliegen.
    124125            float maxDistance_; //!< maximal zulaessige Entfernung von 'this->getPosition()'.
    125126            float warnDistance_; //!< Entfernung von 'this->getPosition()', ab der eine Warnung angezeigt wird, dass man bald das zulaessige Areal verlaesst.
     
    129130                                   //!< Empfohlene Werte: 0.1 (langsame Health-Verminderung) bis 5 (sehr schnelle Health-Verminderung)
    130131           
     132           
    131133            RadarViewable* centerRadar_; //!< Repraesentation von SpaceBoundaries auf dem Radar.
    132134       
     135       
     136            // Funktionen::
    133137            float computeDistance(WorldEntity *item); //!< Auf den Mittelpunkt 'this->getPosition()' bezogen.
    134138            void displayWarning(const std::string warnText);
    135139            void displayBoundaries(Pawn *item);
    136140            void conditionalBounceBack(Pawn *item, float currentDistance, float dt);
     141            void bounceBack(Pawn *item, Vector3 *normal, Vector3 *velocity);
    137142            bool isHumanPlayer(Pawn *item);
     143           
     144            void checkWhoIsIn(); //!< Update the list 'pawnsIn_'.
     145           
     146            void positionBillboard(const Vector3 position); //!< Display a Billboard at the position 'position'.
     147            void setBillboardOptions(Billboard *billy);
     148            void removeAllBillboards(); //!< Hide all elements of '*billboard_' and set their attribute 'usedYet' to 0.
    138149           
    139150    };
Note: See TracChangeset for help on using the changeset viewer.