Changeset 10787 for code/branches/hoverHS15/src
- Timestamp:
- Nov 9, 2015, 3:54:40 PM (9 years ago)
- Location:
- code/branches/hoverHS15/src/modules/hover
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/hoverHS15/src/modules/hover/Hover.cc
r10785 r10787 41 41 { 42 42 bool firstTick = true; 43 int levelcode[10][10] = 44 { 45 { 0,0,0,0,0,0,0,0,0,0 }, // row 0 46 { 1,0,0,0,0,0,0,0,0,0 }, // row 0 47 { 1,0,0,0,0,0,0,0,0,0 }, // row 0 48 { 1,1,3,0,1,3,0,0,0,0 }, // row 0 49 { 1,0,3,2,3,2,0,0,0,0 }, // row 0 50 { 1,0,1,0,1,0,0,0,0,0 }, // row 0 51 { 1,2,2,0,0,0,0,0,0,0 }, // row 0 52 { 1,0,0,0,0,0,0,0,0,0 }, // row 0 53 { 1,0,0,0,0,0,0,0,1,0 },// row 1 54 { 1,0,0,0,0,0,0,1,2,0 } // row 2 55 }; 56 57 43 58 RegisterUnloadableClass(Hover); 44 59 … … 56 71 SUPER(Hover, tick, dt); 57 72 73 74 75 58 76 if(firstTick) 59 77 { 60 78 firstTick = false; 61 new HoverWall(origin_->getContext(), 1, 2, 1); 62 new HoverWall(origin_->getContext(), 2, 6, 1); 79 80 for(int y=0; y<10; y++){ 81 for(int x=0; x<10; x++){ 82 83 switch(levelcode[y][x]){ 84 case 1: new HoverWall(origin_->getContext(), x+1, 10-y, 1); 85 break; 86 case 3: new HoverWall(origin_->getContext(), x+1, 10-y, 1); 87 case 2: new HoverWall(origin_->getContext(), x+1, 10-y, 0); 88 default: break; 89 } 90 91 92 93 } 94 } 95 96 97 98 //new HoverWall(origin_->getContext(), 1, 1, 1); 99 //new HoverWall(origin_->getContext(), 1, 1, 0); 63 100 } 64 101 -
code/branches/hoverHS15/src/modules/hover/HoverWall.cc
r10785 r10787 63 63 xSize_ = 50; 64 64 zSize_ = 2; 65 xPos_ = x*100;66 zPos_ = y*100-50;65 zPos_ = x*100; 66 xPos_ = y*100 -50; 67 67 } 68 68 else{ 69 69 xSize_ = 2; 70 70 zSize_ = 50; 71 xPos_ = x*100-50;72 zPos_ = y*100;71 zPos_ = x*100-50; 72 xPos_ = y*100; 73 73 } 74 74
Note: See TracChangeset
for help on using the changeset viewer.