source: 2017/27/OskariK/OK/OK/OK/OK.cs @ 8840

Revision 8840, 1.1 KB checked in by npo17_42, 4 years ago (diff)

peli aloitettu.

Line 
1using System;
2using System.Collections.Generic;
3using Jypeli;
4using Jypeli.Assets;
5using Jypeli.Controls;
6using Jypeli.Effects;
7using Jypeli.Widgets;
8
9public class OK : Game
10{
11    PhysicsObject command;
12    PhysicsObject feed;
13    public override void Begin()
14    {
15        LuoAlue();
16        Kontrollit();
17
18        Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli");
19    }
20
21    void LuoAlue()
22    {
23        Level.Background.Color = Color.White;
24
25        command = new PhysicsObject(400.0, 300.0);
26        command.Shape = Shape.Rectangle;
27        command.Color = Color.Black;
28        command.X = 100.00;
29        command.Y = -250.00;
30        Add(command);
31
32        feed = new PhysicsObject(700.00, 300.00);
33        feed.Shape = Shape.Rectangle;
34        feed.Color = Color.Black;
35        feed.X = -500.00;
36        feed.Y = -250.00;
37        Add(feed);
38
39        portrait = new PhysicsObject(100.00, 300.00);
40    }
41
42    void Kontrollit ()
43    { Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); }
44}
Note: See TracBrowser for help on using the repository browser.