source: 2012/JAO/SusannaMälkki/pong/pong/pong/pong.cs @ 2682

Revision 2682, 792 bytes checked in by anonymous, 9 years ago (diff)
Line 
1using System;
2using System.Collections.Generic;
3using Jypeli;
4using Jypeli.Assets;
5using Jypeli.Controls;
6using Jypeli.Effects;
7using Jypeli.Widgets;
8
9public class pong : PhysicsGame
10{
11    public override void Begin()
12    { 
13        PhysicsObject pallo = new PhysicsObject( 40.0, 40.0 );
14        pallo.Shape = Shape.Circle;
15        Add( pallo );
16        pallo.X = -200.0;
17        Vector impulssi = new Vector(500.0, 600);
18        pallo.Hit(impulssi);
19        Level.CreateBorders();
20        pallo.Restitution = 1.0;
21        Level.BackgroundColor = Color.Black;
22
23
24   
25        // TODO: Alusta peli tässä
26
27        PhoneBackButton.Listen(ConfirmExit, "Lopeta peli");
28        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli");
29    }
30}
Note: See TracBrowser for help on using the repository browser.