source: 2014/koodauskerho/38/AleksiP/pong/pong/pong/pong.cs @ 5750

Revision 5750, 737 bytes checked in by jotapoti, 5 years ago (diff)
RevLine 
[5750]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
15        PhysicsObject ball = new PhysicsObject(40.0, 40.0);
16        ball.Shape = Shape.Triangle;
17        ball.X = -200.0
18        ball.Y = 0.0;
19        Add(ball);
20        Vector impulssi = new Vector(500.0, 0.0);
21        ball.Hit(impulssi);
22
23        Level.CreateBrorders();
24
25        PhoneBackButton.Listen(ConfirmExit, "Lopeta peli");
26        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli");
27    }
28}
29
30
Note: See TracBrowser for help on using the repository browser.