source: 2017/24/VihantiK/Pong/Pong/Pong/Pong.cs @ 8524

Revision 8524, 753 bytes checked in by npo17_19, 2 years ago (diff)

jotain

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