Revision 6577,
892 bytes
checked in by misakana, 8 years ago
(diff) |
infectediä aloitettu
|
Line | |
---|
1 | using System; |
---|
2 | using System.Collections.Generic; |
---|
3 | using Jypeli; |
---|
4 | using Jypeli.Assets; |
---|
5 | using Jypeli.Controls; |
---|
6 | using Jypeli.Effects; |
---|
7 | using Jypeli.Widgets; |
---|
8 | |
---|
9 | public class infected : PhysicsGame |
---|
10 | { |
---|
11 | PhysicsObject mies; |
---|
12 | Image mieskuva = LoadImage("hahmon kuva"); |
---|
13 | |
---|
14 | public override void Begin() |
---|
15 | { |
---|
16 | |
---|
17 | |
---|
18 | |
---|
19 | |
---|
20 | |
---|
21 | |
---|
22 | |
---|
23 | Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); |
---|
24 | } |
---|
25 | void LuoHahmo(Vector paikka, double leveys, double korkeus) |
---|
26 | { |
---|
27 | mies = new PhysicsObject(mieskuva); |
---|
28 | mies.Size = new Vector(100, 100); |
---|
29 | mies.Position = paikka; |
---|
30 | Add(mies); |
---|
31 | } |
---|
32 | void LuoKentta() |
---|
33 | { |
---|
34 | ColorTileMap mappi = ColorTileMap.FromLevelAsset("mappi"); |
---|
35 | |
---|
36 | mappi.SetTileMethod(Color.Rose, LuoHahmo); |
---|
37 | mappi.Execute(); |
---|
38 | |
---|
39 | |
---|
40 | } |
---|
41 | void |
---|
42 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.