source: 2016/27/TuukkaH/Pong/Pong/Pong/Pong.cs @ 7693

Revision 7693, 826 bytes checked in by karkaite, 3 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        Add(pallo);
15        pallo.X = -0.0;
16        pallo.Y = 0.0;
17        Vector impulssi = new Vector(500.0, 500.0);
18        pallo.Hit(impulssi);
19        Level.CreateBorders(1.0, false);
20        pallo.Restitution = 1.0;
21        Level.Background.Color = Color.Blue;
22        // TODO: Kirjoita ohjelmakoodisi tähän
23        pallo.Shape = Shape.Circle;
24        PhoneBackButton.Listen(ConfirmExit, "Lopeta peli");
25        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli");
26    }
27   
28}
Note: See TracBrowser for help on using the repository browser.