Changeset 8233
- Timestamp:
- 2016-07-29 10:47:06 (7 years ago)
- Location:
- 2016/30/AleksiN/name/name/name
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
2016/30/AleksiN/name/name/name/name.cs
r8231 r8233 21 21 { 22 22 23 Level.Width = Screen.Width * 2 0;23 Level.Width = Screen.Width * 25; 24 24 SmoothTextures = true; 25 25 IsFullScreen = false; … … 64 64 Timer smokeTimer = new Timer(); 65 65 smokeTimer.Interval = 0.1; 66 smokeTimer.Timeout += delegate { smoke.Position = bike.Objects[ 0].Position; };66 smokeTimer.Timeout += delegate { smoke.Position = bike.Objects[1].Position; }; 67 67 smokeTimer.Start(); 68 68 Add(smoke); … … 83 83 void CreateLevel() 84 84 { 85 Surface level = Surface.CreateBottom(Level, 500, 700, 1 60, 150); //500, 700, 160, 150//10, 10, 10, 1085 Surface level = Surface.CreateBottom(Level, 500, 700, 175, 175); //500, 700, 175, 175 //10, 10, 10, 10 86 86 Add(level); 87 87 level.Left = Screen.Left; 88 PhysicsObject flat = PhysicsObject.CreateStaticObject( 15000.0, 50.0);88 PhysicsObject flat = PhysicsObject.CreateStaticObject(20000.0, 50.0); 89 89 flat.Left = level.Right; 90 90 flat.Bottom = level.Bottom; 91 91 flat.Color = level.Color; 92 92 Add(flat); 93 PhysicsObject goal = new PhysicsObject(50.0, 500.0);93 PhysicsObject goal = new PhysicsObject(50.0, 1000.0); 94 94 goal.Color = Color.Brown; 95 95 goal.Right = flat.Right; … … 120 120 rightTire.Image = tire; 121 121 bikePhysicsObject.Image = motorbike; 122 this.bike = new PhysicsStructure( leftTire, rightTire, bikePhysicsObject, hitBox);122 this.bike = new PhysicsStructure(rightTire, leftTire, bikePhysicsObject, hitBox); 123 123 bikePhysicsObject.IgnoresCollisionResponse = true; 124 124 Add(this.bike); … … 133 133 void Keys() 134 134 { 135 Keyboard.Listen(Key.Down, ButtonState.Down, Movement, null, new Vector(- 5000, 0));136 Keyboard.Listen(Key.Up, ButtonState.Down, Movement, null, new Vector( 5000, 0));135 Keyboard.Listen(Key.Down, ButtonState.Down, Movement, null, new Vector(-6000, 0)); 136 Keyboard.Listen(Key.Up, ButtonState.Down, Movement, null, new Vector(6000, 0)); 137 137 Keyboard.Listen(Key.Left, ButtonState.Down, ChangeAngle, null, 1.0); 138 138 Keyboard.Listen(Key.Right, ButtonState.Down, ChangeAngle, null, -1.0);
Note: See TracChangeset
for help on using the changeset viewer.