Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/Asteroid_HS17/data/levels/Asteroids2D.oxw @ 11614

Last change on this file since 11614 was 11614, checked in by vyang, 6 years ago

Asteroids werden random geladen→ collisionShape und Bewegung einstellen

File size: 2.2 KB
Line 
1<LevelInfo
2 name = "Asteroids2D"
3 description = "Try to prevent asteroids from colliding into your spaceshuttle. Be prepared to dodge all asteroids or destroy them."
4 tags = "minigame"
5 screenshot = "emptylevel.png"
6/>
7
8<?lua
9  include("stats.oxo")
10  include("templates/lodInformation.oxt")
11?>
12
13<?lua
14  include("templates/spaceshipAssff2.oxt")
15  include("templates/spaceshipPirate.oxt")
16  include("templates/spaceshipAsteroids2D.oxt")
17  include("templates/enemyInvader.oxt")
18  include("overlays/Asteroids2DHUD.oxo")
19?>
20
21<Level
22  plugins = asteroids2D
23  gametype = Asteroids2D
24>
25  <templates>
26    <Template link=lodtemplate_default />
27  </templates>
28  <?lua include("includes/notifications.oxi") ?>
29
30  <Scene
31    ambientlight = "1.0, 1.0, 1.0"
32    skybox       = "Orxonox/Starbox"
33    negativeWorldRange = "-100000, -100000, -100000"
34    positiveWorldRange = " 100000,  100000,  100000"
35  >
36
37  <WorldAmbientSound
38    source="Earth.ogg"
39    looping="true"
40    playOnLoad="true"
41  />
42
43    <!-- <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/> -->
44    <Light type=directional position="-100, 10000, -700" lookat="0.2, -1, 0" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
45    <SpawnPoint team=0 position="0,0,0" lookat="0,0,0" spawnclass= Asteroids2DShip pawndesign=spaceshipasteroids2d />
46
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
78    <Asteroids2DCenterPoint name=asteroids2Dcenter />
79 
80   
81  </Scene>
82</Level>
Note: See TracBrowser for help on using the repository browser.