source: 2016/26/ViiviV/Ping pong/Ping pong/Ping_pong/Ping_pong.cs @ 7514

Revision 7514, 944 bytes checked in by vivivaur, 3 years ago (diff)

tein bong pelin

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