source: 2013/26/AkseliT/pong/pong/pong/pong.cs @ 4178

Revision 4178, 867 bytes checked in by akjotoiv, 9 years ago (diff)

Talletus.

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