Changeset 6156 for 2015/26/ohjaajat/HillbillyRun/HillbillyRun/HillbillyRun/HillbillyRun/HillbillyRun.cs
- Timestamp:
- 2015-06-23 08:37:57 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/26/ohjaajat/HillbillyRun/HillbillyRun/HillbillyRun/HillbillyRun/HillbillyRun.cs
r6151 r6156 36 36 private Image groundTopImage = LoadImage("ground_top"); 37 37 38 private Image cartImage = LoadImage("cart"); 39 private Image cartWheelImage = LoadImage("cartwheel"); 40 38 41 public override void Begin() 39 42 { … … 47 50 cameraTimer.Timeout += UpdateCamera; 48 51 cameraTimer.Start(); 52 53 // Testailen tässä kärryn luomista. 54 double size = 0.7; 55 PhysicsObject cart = new PhysicsObject(400 * size, 80 * size); 56 cart.X = -1600; 57 cart.Y = 200; 58 cart.Image = cartImage; 59 cart.CollisionIgnoreGroup = 2; 60 Add(cart); 61 PhysicsObject cartWheel = new PhysicsObject(160 * size, 160 * size, Shape.Circle); 62 cartWheel.Image = cartWheelImage; 63 cartWheel.Position = cart.Position + new Vector(-110, -30) * size; 64 cartWheel.CollisionIgnoreGroup = 2; 65 Add(cartWheel); 66 AxleJoint joint = new AxleJoint(cart, cartWheel); 67 Add(joint); 49 68 } 50 69
Note: See TracChangeset
for help on using the changeset viewer.