Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 1, 2017, 6:38:00 PM (6 years ago)
Author:
vyang
Message:

Asteroids werden random geladen→ collisionShape und Bewegung einstellen

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/Asteroid_HS17/data/levels/Asteroids2D.oxw

    r11608 r11614  
    4545    <SpawnPoint team=0 position="0,0,0" lookat="0,0,0" spawnclass= Asteroids2DShip pawndesign=spaceshipasteroids2d />
    4646
    47     <Model mesh="axes.mesh" scale=10 position="0,0,0" />
     47    <!--<Model mesh="axes.mesh" scale=10 position="0,0,0" /> -->
     48
     49
     50    <?lua
     51      for i = 1, 250, 1
     52      do
     53      j = math.random()
     54    ?>
     55
     56    <MovableEntity
     57      position = "<?lua print(math.random()* 15000 - 1000) ?>,<?lua print(math.random() * 12000 - 4000) ?>,<?lua print(math.random() * 12000 - 4000) ?>"
     58      collisionType = dynamic
     59      linearDamping = 0.8
     60      angularDamping = 0
     61      scale = "<?lua print(j * 150)?>"
     62      collisiondamage = 1
     63      enablecollisiondamage = true
     64    >
     65      <attached>
     66        <Model mass="<?lua print(j * 1000) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" />
     67      </attached>
     68      <collisionShapes>
     69        <SphereCollisionShape radius="<?lua print(j * 350) ?>" />
     70      </collisionShapes>
     71    </MovableEntity>
     72
     73    <?lua
     74      end
     75    ?>
     76
     77
    4878    <Asteroids2DCenterPoint name=asteroids2Dcenter />
    4979 
Note: See TracChangeset for help on using the changeset viewer.