Ignore:
Timestamp:
2016-07-27 10:28:41 (3 years ago)
Author:
almajono
Message:
 
File:
1 edited

Legend:

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

    r8115 r8133  
    99public class name : PhysicsGame 
    1010{ 
     11 
     12    Image tire = LoadImage("tire"); 
    1113    PhysicsStructure tires = new PhysicsStructure(); 
    1214    public override void Begin() 
     15 
    1316    { 
    14        points(); 
     17 
     18        IsFullScreen = true; 
     19 
     20        spawnTires(); 
     21        points(); 
     22        keys(); 
     23         
    1524 
    1625        Surface level = Surface.CreateBottom(Level, 30, 100, 10, 100); 
    1726        Add(level); 
    18  
    1927        Gravity = new Vector(0.0, -800.0); 
    2028 
     29    } 
     30 
     31    void spawnTires() 
     32    { 
    2133        PhysicsObject leftTire = new PhysicsObject(50.0, 50.0, Shape.Circle); 
    2234        PhysicsObject rightTire = new PhysicsObject(50.0, 50.0, Shape.Circle); 
     
    2739        tires = new PhysicsStructure(leftTire, rightTire); 
    2840        Add(tires); 
    29  
     41    } 
     42    void keys() 
     43    { 
    3044        Keyboard.Listen(Key.Left, ButtonState.Down, movement, null, new Vector(-2000, 0)); 
    3145        Keyboard.Listen(Key.Right, ButtonState.Down, movement, null, new Vector(2000, 0)); 
    3246        Keyboard.Listen(Key.Up, ButtonState.Down, angle, null, new Vector(-500, 0)); 
    3347        Keyboard.Listen(Key.Down, ButtonState.Down, angle, null, new Vector(500, 0)); 
    34  
    3548        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 
    3649    } 
    37  
    3850    void movement(Vector movement) 
    3951    { 
    4052        tires.Push(movement); 
    4153    } 
    42  
    4354    void angle(Vector angle) 
    4455    { 
    4556 
    4657    } 
    47  
    4858    IntMeter pointCounter; 
    49  
    5059    void points() 
    5160    { 
Note: See TracChangeset for help on using the changeset viewer.