source: 2016/24/LasseK/Pong.txt @ 9884

Revision 7264, 833 bytes checked in by latukova, 3 years ago (diff)

Juuuuu

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