source: 2013/24/BenjaminT/Pong/Pong/Pong/Pong.cs @ 4043

Revision 4043, 710 bytes checked in by betiterv, 8 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        PhysicsObject pallo = new PhysicsObject(80.0, 80.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, 0.0);
19        pallo.Hit(impulssi);
20        Level.CreateBorders(1.0, false);
21        pallo.Restitution = 1.0;
22        Level.BackgroundColor = Color.Black;
23        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli");
24    }
25}
Note: See TracBrowser for help on using the repository browser.