source: 2011/24/JuusoP/green Peace/green Peace/green Peace/Peli.cs @ 1990

Revision 1990, 1.6 KB checked in by paaaanro, 12 years ago (diff)
Line 
1using System;
2using System.Collections.Generic;
3using Jypeli;
4using Jypeli.Assets;
5using Jypeli.Controls;
6using Jypeli.Effects;
7using Jypeli.Widgets;
8
9public class Peli : PhysicsGame
10{
11
12    public override void Begin()
13    {
14       
15        LuoKenttä();
16    }
17
18    void LuoKenttä()
19    {
20        //PhysicsObject hiirulainen = new PhysicsObject(20, 35);
21        //hiirulainen.Shape = Shape.Triangle;
22        //hiirulainen.Color = Color.Gray;
23        //hiirulainen.X = 20;
24        //hiirulainen.Y = 80;
25        //Add(hiirulainen);
26
27        Luoseina(-170, -280);
28        Luoseina(170, -280);
29        Luoseina(170, 280);
30        Luoseina(-170, 280);
31
32        Luoseina2(230, -170);
33        Luoseina2(-230, -170);
34        Luoseina2(230, 170);
35        Luoseina2(-230, 170);
36       
37
38        //PhysicsObject mato = new PhysicsObject(10, 150);
39        //mato.Shape = Shape.Rectangle;
40        //mato.Color = Color.LimeGreen;
41        //Add(mato);
42
43        Level.CreateBorders(isVisible: true);
44        Level.BackgroundColor = Color.Pink;
45
46        Camera.ZoomToLevel(+5);
47       
48    }
49
50    void Luoseina(double x, double y)
51    {
52        PhysicsObject seina = PhysicsObject.CreateStaticObject(50, 500);
53        seina.X = x;
54        seina.Y = y;
55        seina.Shape = Shape.Rectangle;
56        seina.Color = Color.Brown;
57        Add(seina);
58    }
59
60    void Luoseina2(double x, double y)
61    {
62        PhysicsObject seina2 = PhysicsObject.CreateStaticObject(400, 50);
63        seina2.X = x;
64        seina2.Y = y;
65        seina2.Shape = Shape.Rectangle;
66        seina2.Color = Color.Brown;
67        Add(seina2);
68    }
69}
Note: See TracBrowser for help on using the repository browser.