Changeset 8193 for 2016


Ignore:
Timestamp:
2016-07-28 11:32:57 (7 years ago)
Author:
almajono
Message:
 
Location:
2016/30/AleksiN/name/name/name
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • 2016/30/AleksiN/name/name/name/name.cs

    r8186 r8193  
    1313    Image tire = LoadImage("tire"); 
    1414    PhysicsObject bikePhysicsObject; 
     15    PhysicsObject leftTire; 
     16    PhysicsObject rightTire; 
    1517    PhysicsStructure bike; 
    1618    public override void Begin() 
     
    2931        Camera.Follow(bikePhysicsObject); 
    3032 
    31         Surface level = Surface.CreateBottom(Level, 200, 300, 200, 20); 
     33        Surface level = Surface.CreateBottom(Level, 400, 700, 200, 250); 
    3234        Add(level); 
    3335        Gravity = new Vector(0.0, -800.0); 
     
    3739        Timer smokeTimer = new Timer(); 
    3840        smokeTimer.Interval = 0.1; 
    39         smokeTimer.Timeout += delegate { smoke.Position = bike.Objects[0].Position; }; 
     41        smokeTimer.Timeout += delegate { smoke.Position = bike.Objects[1].Position; }; 
    4042        smokeTimer.Start(); 
    4143        Add(smoke); 
     
    4547    void AddPlayer() 
    4648    { 
    47         PhysicsObject leftTire = new PhysicsObject(57.5, 57.5, Shape.Circle); 
    48         PhysicsObject rightTire = new PhysicsObject(57.5, 57.5, Shape.Circle); 
     49        leftTire = new PhysicsObject(57.5, 57.5, Shape.Circle); 
     50        rightTire = new PhysicsObject(57.5, 57.5, Shape.Circle); 
    4951        bikePhysicsObject = new PhysicsObject(250.0, 200.0); 
    5052        leftTire.X = -70.0; 
     
    5759        rightTire.Image = tire; 
    5860        bikePhysicsObject.Image = motorbike; 
    59         this.bike = new PhysicsStructure(rightTire, leftTire, bikePhysicsObject); 
     61        this.bike = new PhysicsStructure(leftTire, rightTire, bikePhysicsObject); 
    6062        bikePhysicsObject.IgnoresCollisionResponse = true; 
    6163        Add(this.bike); 
     
    6769    void Keys() 
    6870    { 
    69         Keyboard.Listen(Key.Down, ButtonState.Down, Movement, null, new Vector(-3000, 0)); 
    70         Keyboard.Listen(Key.Up, ButtonState.Down, Movement, null, new Vector(3000, 0)); 
     71        Keyboard.Listen(Key.Down, ButtonState.Down, Movement, null, new Vector(-3500, 0)); 
     72        Keyboard.Listen(Key.Up, ButtonState.Down, Movement, null, new Vector(3500, 0)); 
    7173        Keyboard.Listen(Key.Left, ButtonState.Down, ChangeAngle, null, 1.0); 
    7274        Keyboard.Listen(Key.Right, ButtonState.Down, ChangeAngle, null, -1.0); 
Note: See TracChangeset for help on using the changeset viewer.