Changeset 12074 for code/branches
- Timestamp:
- Nov 7, 2018, 10:14:37 AM (6 years ago)
- Location:
- code/branches/OrxoKart_HS18
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/OrxoKart_HS18/data/levels/OrxoKart1.oxw
r12070 r12074 1 1 <LevelInfo 2 name = " Hover 2"3 description = "Level for Minigame Hover"2 name = "OrxoKart" 3 description = "Level for Minigame OrxoKart" 4 4 tags = "minigame" 5 5 screenshot = "emptylevel.png" … … 13 13 14 14 <?lua 15 include("templates/spaceshipPirate.oxt")15 --include("templates/spaceshipPirate.oxt") 16 16 include("templates/OrxoKartKart.oxt") 17 17 include("overlays/HoverHUD.oxo") … … 32 32 33 33 <Level 34 plugins = hover35 gametype = Hover34 plugins = orxokart 35 gametype = OrxoKart 36 36 > 37 37 <templates> … … 49 49 <attached> 50 50 <!-- Walls and flags (physics and design)--> 51 <!-- 51 <!-- 52 52 <HoverOrigin 53 --> 54 <OrxoKartOrigin 55 53 56 numCells="<?lua print(N)?>" 54 57 cellSize="<?lua print(S)?>" 55 58 cellHeight="<?lua print(MAZE_CELL_HEIGHT)?>" 56 59 /> 57 -->60 58 61 59 62 <!-- floor design --> -
code/branches/OrxoKart_HS18/src/modules/CMakeLists.txt
r12030 r12074 50 50 ADD_SUBDIRECTORY(flappyorx) 51 51 ADD_SUBDIRECTORY(orxyroad) 52 ADD_SUBDIRECTORY(orxokart) -
code/branches/OrxoKart_HS18/src/modules/orxokart/CMakeLists.txt
r12057 r12074 1 SET_SOURCE_FILES( Hover_SRC_FILES1 SET_SOURCE_FILES(OrxoKart_SRC_FILES 2 2 OrxoKart.cc 3 3 OrxoKartKart.cc … … 7 7 ) 8 8 9 ORXONOX_ADD_LIBRARY( hover9 ORXONOX_ADD_LIBRARY(orxokart 10 10 PLUGIN 11 11 FIND_HEADER_FILES … … 14 14 objects 15 15 overlays 16 SOURCE_FILES ${ Hover_SRC_FILES}16 SOURCE_FILES ${OrxoKart_SRC_FILES} 17 17 ) -
code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKart.cc
r12062 r12074 47 47 48 48 this->origin_ = nullptr; 49 this->numberOfFlags_ = 1;49 // this->numberOfFlags_ = 1; 50 50 this->firstTick_ = true; 51 51 52 this-> nullptr52 this->setHUDTemplate("HoverHUD"); 53 53 } 54 54 … … 65 65 int cellHeight = this->origin_->getCellHeight(); 66 66 67 MazeGenerator generator(numCells); 68 generator.generateMaze(); 69 generator.renderMaze(); 70 int levelcodeArray[] = {1,1,1,1,1,1,1,1,0,0,0 67 int levelcodeArray[] = {1,1,1,1,1,1,1,1,0,0,0 71 68 ,1,0,0,0,0,0,0,1,1,1,0 72 69 ,1,0,1,1,1,1,0,0,0,1,1 … … 79 76 ,0,0,0,0,1,0,0,0,0,0,1 80 77 ,0,0,0,0,1,1,1,1,1,1,1}; 81 //int* levelcode = generator.getLevelcode();82 78 int* levelcode = levelcodeArray; 83 79 … … 106 102 107 103 }//firsttick end 108 104 /* 109 105 // Check if ship collided with one of the flags 110 106 for ( unsigned int i = 0; i < flags_.size(); i++ ){ … … 114 110 } 115 111 } 116 numberOfFlags_ = flags_.size(); 112 numberOfFlags_ = flags_.size(); */ 117 113 118 114 } -
code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKart.h
r12062 r12074 60 60 private: 61 61 WeakPtr<OrxoKartOrigin> origin_; 62 std::vector<OrxoKartFlag*> flags_;63 int numberOfFlags_;62 //std::vector<OrxoKartFlag*> flags_; 63 //int numberOfFlags_; 64 64 bool firstTick_; 65 65 }; -
code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKartOrigin.cc
r12062 r12074 53 53 XMLPortParam(OrxoKartOrigin, "numCells", setNumCells, getNumCells, xmlelement, mode); 54 54 XMLPortParam(OrxoKartOrigin, "cellSize", setCellSize, getCellSize, xmlelement, mode); 55 XMLPortParam(OrxoKartOrigin, " mapMatrix", setMapMatrix, getMapMatrix, xmlelement, mode);55 XMLPortParam(OrxoKartOrigin, "cellHeight", setCellHeight, getCellHeight, xmlelement, mode); 56 56 } 57 57 -
code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKartOrigin.h
r12062 r12074 61 61 { return this->cellSize_; } 62 62 63 inline void set MapMatrix(int mapMatrix)64 { this-> mapMatrix_ = mapMatrix; }65 inline int get MapMatrix() const66 { return this-> mapMatrix_; }63 inline void setCellHeight(int cellHeight) 64 { this->cellHeight_ = cellHeight; } 65 inline int getCellHeight() const 66 { return this->cellHeight_; } 67 67 68 68 private: … … 71 71 int numCells_; 72 72 int cellSize_; 73 int mapMatrix_;73 int cellHeight_; 74 74 }; 75 75 } -
code/branches/OrxoKart_HS18/src/modules/orxokart/TimeHUD.cc
r12057 r12074 35 35 #include "core/CoreIncludes.h" 36 36 #include "util/Convert.h" 37 #include " Hover.h"37 #include "OrxoKart.h" 38 38 39 39 namespace orxonox … … 47 47 this->time_ = 0.0f; 48 48 this->running_ = false; 49 this-> hoverGame_ = nullptr;49 this->orxokartGame_ = nullptr; 50 50 setRunning(true); 51 51 } … … 79 79 this->time_ += dt; 80 80 } 81 if (this-> hoverGame_)81 if (this->orxokartGame_) 82 82 { 83 83 this->setCaption(getTimeString(this->time_)); 84 if (this->hoverGame_->getNumberOfFlags() == 0)85 setRunning(false);84 //if (this->orxokartGame_->getNumberOfFlags() == 0) 85 // setRunning(false); 86 86 } 87 87 … … 94 94 if (this->getOwner() && this->getOwner()->getGametype()) 95 95 { 96 this-> hoverGame_ = orxonox_cast<Hover*>(this->getOwner()->getGametype());96 this->orxokartGame_ = orxonox_cast<OrxoKart*>(this->getOwner()->getGametype()); 97 97 } 98 98 else 99 99 { 100 this-> hoverGame_ = nullptr;100 this->orxokartGame_ = nullptr; 101 101 } 102 102 } -
code/branches/OrxoKart_HS18/src/modules/orxokart/TimeHUD.h
r12057 r12074 33 33 #define _TimeHUD_H__ 34 34 35 #include " HoverPrereqs.h"35 #include "OrxoKartPrereqs.h" 36 36 37 37 #include "tools/interfaces/Tickable.h" … … 40 40 namespace orxonox 41 41 { 42 class _ HoverExport TimeHUD : public OverlayText, public Tickable42 class _OrxoKartExport TimeHUD : public OverlayText, public Tickable 43 43 { 44 44 public: … … 58 58 59 59 private: 60 Hover* hoverGame_;60 OrxoKart* orxokartGame_; 61 61 float time_; 62 62 bool running_;
Note: See TracChangeset
for help on using the changeset viewer.