Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 4, 2016, 5:22:59 PM (9 years ago)
Author:
landauf
Message:

hover: maze size is now fully configurable in xml

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentationHS15/data/levels/Hover.oxw

    r11026 r11040  
    1818?>
    1919
     20<?lua
     21MAZE_NUM_CELLS = 10
     22MAZE_CELL_SIZE = 100
     23MAZE_CELL_HEIGHT = 30
     24MAZE_SIZE = MAZE_NUM_CELLS*MAZE_CELL_SIZE
     25?>
     26
    2027<Level
    2128plugins = hover
     
    3239    gravity      = "0, -200, 0"
    3340  >
    34  
    3541
     42    <StaticEntity position="0,0,0" collisionType="static">
     43      <attached>
     44        <HoverOrigin
     45          numCells="<?lua print(MAZE_NUM_CELLS)?>"
     46          cellSize="<?lua print(MAZE_CELL_SIZE)?>"
     47          cellHeight="<?lua print(MAZE_CELL_HEIGHT)?>"
     48        />
     49        <Model
     50          position="<?lua print(MAZE_SIZE/2)?>,-16,<?lua print(MAZE_SIZE/2)?>"
     51          scale3D="<?lua print(MAZE_SIZE/2)?>,16,<?lua print(MAZE_SIZE/2)?>"
     52          mesh="CubeGround.mesh"
     53        />
     54      </attached>
     55      <collisionShapes>
     56        <BoxCollisionShape
     57          position="<?lua print(MAZE_SIZE/2)?>,<?lua print(MAZE_CELL_HEIGHT+1)?>,<?lua print(MAZE_SIZE/2)?>"
     58          halfExtents="<?lua print(MAZE_SIZE/2)?>,1,<?lua print(MAZE_SIZE/2)?>"
     59        />
     60        <BoxCollisionShape
     61          position="<?lua print(MAZE_SIZE/2)?>,-1,<?lua print(MAZE_SIZE/2)?>"
     62          halfExtents="<?lua print(MAZE_SIZE/2)?>,1,<?lua print(MAZE_SIZE/2)?>"
     63        />
     64      </collisionShapes>
     65    </StaticEntity>
    3666
    37  
    38 
    39   <StaticEntity position="0,0,0" collisionType="static">
    40     <attached>
    41     </attached>
    42     <collisionShapes>
    43       <BoxCollisionShape yaw="0" pitch="0" roll="0" position="500,0,0" halfExtents="500, 30, 2" />
    44       <BoxCollisionShape yaw="0" pitch="0" roll="0" position="500,0,1000" halfExtents="500, 30, 2" />
    45       <BoxCollisionShape yaw="0" pitch="0" roll="0" position="0,0,500" halfExtents="2, 30, 500" />
    46       <BoxCollisionShape yaw="0" pitch="0" roll="0" position="1000,0,500" halfExtents="2, 30, 500" />
    47 
    48     </collisionShapes>
    49   </StaticEntity>
    50 
    51   <StaticEntity position="0,0,0" collisionType="static">
    52     <attached>
    53       <Model position="500, -16,500" yaw="0" pitch="0" roll="0" scale3D="500, 16, 500" mesh="CubeGround.mesh" />     
    54     </attached>
    55     <collisionShapes>
    56       <BoxCollisionShape yaw="0" pitch="0" roll="0" position="0,50,0" halfExtents="10000, 1, 10000" />
    57       <BoxCollisionShape yaw="0" pitch="0" roll="0" position="0,-10,0" halfExtents="10000, 10, 10000" />
    58       <BoxCollisionShape yaw="0" pitch="0" roll="0" position="500, 0,0" halfExtents="1000, 1000, 1" />
    59       <BoxCollisionShape yaw="0" pitch="0" roll="0" position="500, 0, 1000" halfExtents="1000, 1000, 1" />   
    60       <BoxCollisionShape yaw="0" pitch="0" roll="0" position="0, 0, 500" halfExtents="1, 1000, 1000" />
    61       <BoxCollisionShape yaw="0" pitch="0" roll="0" position="1000, 0, 500" halfExtents="1, 1000, 1000" />           
    62 
    63 
    64     </collisionShapes>
    65   </StaticEntity>
    66 
    67 
    68     <MovableEntity position="0,0,0">
    69       <attached>
    70         <HoverOrigin>
    71 
    72           <attached>
    73 
    74           </attached>
    75         </HoverOrigin>
    76       </attached>
    77     </MovableEntity>
    78 
    79 
    80 
     67    <Light
     68      type=directional
     69      position="-50,500,-50"
     70      direction="0.577, -0.577, 0.577"
     71      diffuse="1.0, 0.9, 0.9, 1.0"
     72      specular="1.0, 0.9, 0.9, 1.0"
     73    />
    8174   
    82     <Light type=directional position="-50,500,-50" direction="0.577, -0.577, 0.577" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
    83     <SpawnPoint team=0 position="50,20,50" lookat="100,20,100" spawnclass=HoverShip pawndesign=spaceshiphover />
     75    <SpawnPoint
     76      team=0
     77      position="50,20,50"
     78      lookat="100,20,100"
     79      spawnclass=HoverShip
     80      pawndesign=spaceshiphover
     81    />
    8482   
    8583  </Scene>
Note: See TracChangeset for help on using the changeset viewer.