source: 2016/27/ValtteriM/Pingpok/Pingpok/Pingpok/Pingpok.cs @ 7694

Revision 7694, 865 bytes checked in by karkaite, 3 years ago (diff)

ALOITETTIIN PELIN TEKEMINEN

Line 
1using System;
2using System.Collections.Generic;
3using Jypeli;
4using Jypeli.Assets;
5using Jypeli.Controls;
6using Jypeli.Effects;
7using Jypeli.Widgets;
8
9public class Pingpok : PhysicsGame
10{
11    public override void Begin()
12    {
13      LuoKentta();
14
15     
16        Vector impulssi = new Vector(500.0, 0.0);
17        pallo.Hit(impulssi);
18
19        // TODO: Kirjoita ohjelmakoodisi
20
21
22        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli");
23    }
24    void LuoKentta()
25    {
26        PhysicsObject pallo = new PhysicsObject(40.0, 40.0);
27        pallo.Shape = Shape.Circle;
28        Add(pallo);
29        pallo.X = -200.0;
30        pallo.Y = 0.0;
31        pallo.Restitution = 1.0;
32
33        Level.CreateBorders(1.0, false);
34        Level.Background.Color = Color.Gold;
35
36        Camera.ZoomToLevel();
37
38    }
39}
Note: See TracBrowser for help on using the repository browser.