comparison urQuan.d @ 6:eb6059f7035a

Added planet
author zzzzrrr <mason.green@gmail.com>
date Sat, 21 Mar 2009 16:42:08 -0400
parents 6f455ef24063
children 2217fd1fe384
comparison
equal deleted inserted replaced
5:6f455ef24063 6:eb6059f7035a
39 39
40 // UrQuan Dreadnought 40 // UrQuan Dreadnought
41 class UrQuan : Ship 41 class UrQuan : Ship
42 { 42 {
43 43
44 float scale = 0.01; 44 float scale = 0.025;
45 45
46 this(bzWorld world) { 46 this(bzWorld world) {
47 47
48 super(world);
48 auto bodyDef = new bzBodyDef; 49 auto bodyDef = new bzBodyDef;
49 bodyDef.position = bzVec2(10,5); 50 bodyDef.position = bzVec2(10,5);
50 bodyDef.allowFreeze = false; 51 bodyDef.allowFreeze = false;
51 auto rBody = world.createBody(bodyDef); 52 rBody = world.createBody(bodyDef);
52 super(rBody);
53 float density = 2.0f; 53 float density = 2.0f;
54 54
55 // Head 55 // Head
56 auto head = new bzPolyDef; 56 auto head = new bzPolyDef;
57 head.vertices.length = 8; 57 head.vertices.length = 8;
109 bWing.vertices[2] = bzVec2(28,-70) * scale; 109 bWing.vertices[2] = bzVec2(28,-70) * scale;
110 bWing.vertices[1] = bzVec2(-42,-70) * scale; 110 bWing.vertices[1] = bzVec2(-42,-70) * scale;
111 shapes.add(rBody.createShape(bWing)); 111 shapes.add(rBody.createShape(bWing));
112 112
113 rBody.setMassFromShapes(); 113 rBody.setMassFromShapes();
114 setGravity();
114 } 115 }
115 } 116 }