Changeset 8168 for 2016/30/AleksiN


Ignore:
Timestamp:
2016-07-27 14:58:18 (3 years ago)
Author:
almajono
Message:
 
Location:
2016/30/AleksiN/name
Files:
6 edited

Legend:

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

    r8163 r8168  
    1212    Image motorbike = LoadImage("motorbike"); 
    1313    Image tire = LoadImage("tire"); 
     14    PhysicsObject bikePhysicsObject; 
    1415    PhysicsStructure bike; 
    1516    public override void Begin() 
     
    1920        SmoothTextures = true; 
    2021        //IsFullScreen = true; 
     22        Camera.Follow(bikePhysicsObject); 
    2123 
    2224        AddPlayer(); 
     
    4244        PhysicsObject leftTire = new PhysicsObject(57.5, 57.5, Shape.Circle); 
    4345        PhysicsObject rightTire = new PhysicsObject(57.5, 57.5, Shape.Circle); 
    44         PhysicsObject bike = new PhysicsObject(250.0, 200.0); 
     46        bikePhysicsObject = new PhysicsObject(250.0, 200.0); 
    4547        leftTire.X = -70.0; 
    4648        leftTire.Y = -260.0; 
    4749        rightTire.X = 65.0; 
    4850        rightTire.Y = -260.0; 
    49         bike.X = 0; 
    50         bike.Y = -200; 
     51        bikePhysicsObject.X = 0; 
     52        bikePhysicsObject.Y = -200; 
    5153        leftTire.Image = tire; 
    5254        rightTire.Image = tire; 
    53         bike.Image = motorbike; 
    54         this.bike = new PhysicsStructure(leftTire, rightTire, bike); 
    55         bike.IgnoresCollisionResponse = true; 
     55        bikePhysicsObject.Image = motorbike; 
     56        this.bike = new PhysicsStructure(leftTire, rightTire, bikePhysicsObject); 
     57        bikePhysicsObject.IgnoresCollisionResponse = true; 
    5658        Add(this.bike); 
    57         Add(bike); 
     59        Add(bikePhysicsObject); 
    5860    } 
    5961    void Keys() 
Note: See TracChangeset for help on using the changeset viewer.