source: 2012/JAO/Sonja venäläinen/pong/pong/pong/pong.cs @ 2678

Revision 2678, 892 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        pallo.Y = 0.0;
18        Vector impulssi = new Vector(500.0, 100);
19        pallo.Hit(impulssi);
20        Level.CreateBorders();
21        pallo.Restitution = 1.0;
22        Level.CreateBorders(1.0, false);
23        Level.BackgroundColor = Color.Black;
24        Camera.ZoomToLevel();
25
26
27
28
29        // TODO: Kirjoita ohjelmakoodisi tähän
30
31        PhoneBackButton.Listen(ConfirmExit, "Lopeta peli");
32        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli");
33    }
34}
Note: See TracBrowser for help on using the repository browser.