source: 2012/JAO/Miisa/pong/pong/pong/pong.cs @ 2684

Revision 2684, 912 bytes checked in by anonymous, 9 years ago (diff)

pongia pari vaihetta eteenpäi

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    PhysicsObject pallo;
12
13    public override void Begin()
14    {
15        // TODO: Alusta peli tässä
16
17
18
19
20
21
22        PhoneBackButton.Listen(ConfirmExit, "Lopeta peli");
23        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli");
24    }
25
26    void Luokentta()
27    {
28        Vector impulssi = new Vector(500.0, 0.0);
29        pallo.Hit(impulssi);
30        pallo = new PhysicsObject(40.0, 40.0);
31
32        pallo.Shape = Shape.Circle;
33        Add(pallo);
34        pallo.X = -200.0;
35        pallo.Y = 0.0;
36        pallo.Restitution = 1.0;
37        Level.CreateBorders(1.0, false);
38
39        Level.BackgroundColor = Color.Red;
40        Camera.ZoomToLevel();
41
42    }
43
44
45}
Note: See TracBrowser for help on using the repository browser.