Changeset 2680


Ignore:
Timestamp:
2012-04-16 10:58:02 (11 years ago)
Author:
anonymous
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2012/JAO/JouniKovanen/ponki/ponki/ponki/ponki.cs

    r2671 r2680  
    1111    public override void Begin() 
    1212    { 
    13         // TODO: Kirjoita ohjelmakoodisi tähän 
     13        PhysicsObject pallo = new PhysicsObject(40.0, 40.0); 
     14        pallo.Shape = Shape.Circle; 
     15        Add(pallo); 
     16        pallo.X = -200.0; 
     17        pallo.Y = 0.0; 
     18        pallo.Restitution = 1.0; 
     19       
     20        Level.CreateBorders(1.0, false); 
     21        Level.BackgroundColor = Color.Black; 
     22        Camera.ZoomToLevel(); 
     23        Vector impulssi = new Vector(500.0, 0.0); 
     24        pallo.Hit(impulssi); 
     25 
    1426 
    1527        PhoneBackButton.Listen(ConfirmExit, "Lopeta peli"); 
    1628        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 
    1729    } 
     30    void LuoKentta() 
     31    { 
     32        PhysicsObject pallo = new PhysicsObject(40.0, 40.0); 
     33        pallo.Shape = Shape.Circle; 
     34        Add(pallo); 
     35        pallo.X = -200.0; 
     36        pallo.Y = 0.0; 
     37        pallo.Restitution = 1.0; 
     38 
     39        Level.CreateBorders(1.0, false); 
     40        Level.BackgroundColor = Color.Black; 
     41        Camera.ZoomToLevel(); 
     42         
     43    } 
     44 
     45 
     46 
     47 
     48 
     49 
     50 
     51 
    1852} 
Note: See TracChangeset for help on using the changeset viewer.