source: 2016/25/ToukoP/Pong/Pong/Pong/Pong.cs @ 7454

Revision 7454, 812 bytes checked in by tesatapa, 4 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        // TODO: Kirjoita ohjelmakoodisi tähän
14        PhysicsObject
15           pallo = new PhysicsObject(50, 50);
16        Add(pallo);
17        pallo.Shape = Shape.Circle;
18        pallo.Color = Color.Gold;
19        Level.Background.CreateGradient(Color.Black, Color.Blue);
20        pallo.X = -200.0;
21        pallo.Y = 0.0;
22        Vector impulssi = new Vector(500.0, 0.0);
23        pallo.Hit(impulssi);
24           PhoneBackButton.Listen(ConfirmExit, "Lopeta peli");
25        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli");
26    }
27}
Note: See TracBrowser for help on using the repository browser.