Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 4, 2016, 11:23:59 AM (8 years ago)
Author:
landauf
Message:

moved maze-generator-code into separate class. made all static variables private members. this fixes a number of issues when reloading the hover game.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentationHS15/src/modules/hover/Hover.h

    r11026 r11035  
    5959namespace orxonox
    6060{
    61 
    62     enum eDirection
    63     {
    64         eDirection_Invalid = 0,
    65         eDirection_Up      = 1,
    66         eDirection_Right   = 2,
    67         eDirection_Down    = 4,
    68         eDirection_Left    = 8
    69     };
    70 
    7161    class _HoverExport Hover : public Gametype
    7262    {
     
    8070
    8171            void setOrigin(HoverOrigin* origin)
    82                        { this->origin_ = origin; }
     72                { this->origin_ = origin; }
    8373
    8474            int getFlags();
    85             WeakPtr<HoverOrigin> origin_;
    8675
    8776        private:
    88             int CellIdx();
    89             int RandomInt();
    90             int RandomInt4();
    91             int Flags_;
    92 
    93             bool IsDirValid( eDirection Dir );
    94             eDirection GetDirection();
    95             void GenerateMaze();
    96             void RenderMaze();
    97             void MazeOut();
    98             void LevelOut();
    99             std::vector<HoverFlag*> flagVector;
    100 
    101 
     77            WeakPtr<HoverOrigin> origin_;
     78            std::vector<HoverFlag*> flagVector_;
     79            int flags_;
     80            bool firstTick_;
    10281    };
    10382}
Note: See TracChangeset for help on using the changeset viewer.