source: 2016/25/TeroP/Pong/Pong/Pong/Pong.cs @ 7450

Revision 7450, 703 bytes checked in by tesatapa, 4 years ago (diff)

Esimerkki pallon luominen

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 pallo = new PhysicsObject(50, 50);
15        pallo.Shape = Shape.Circle;
16        pallo.Color = Color.Gold;
17        Add(pallo);
18       // pallo.Color = Color.Red;
19        Level.Background.CreateGradient(Color.Black, Color.Blue);
20
21        PhoneBackButton.Listen(ConfirmExit, "Lopeta peli");
22        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli");
23    }
24}
Note: See TracBrowser for help on using the repository browser.