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 G : PhysicsGame |
---|
10 | { |
---|
11 | //public static G game; |
---|
12 | //public Image playerImage = LoadImage("Player"); |
---|
13 | |
---|
14 | Zombie1 zombie1; |
---|
15 | |
---|
16 | public override void Begin() |
---|
17 | { |
---|
18 | <<<<<<< .mine |
---|
19 | //this; |
---|
20 | ======= |
---|
21 | |
---|
22 | |
---|
23 | Zombie1 zombie1 = new Zombie1(50, 50); |
---|
24 | |
---|
25 | createBrain1(); |
---|
26 | |
---|
27 | Add(zombie1); |
---|
28 | |
---|
29 | game = this; |
---|
30 | >>>>>>> .r4369 |
---|
31 | Player pelaaja = new Player(this, 50, 50); |
---|
32 | pelaaja.Tag = "Player"; |
---|
33 | Add(pelaaja); |
---|
34 | |
---|
35 | ScoreMeter(); |
---|
36 | |
---|
37 | Keyboard.Listen(Key.Escape, ButtonState.Pressed, Exit, "Lopeta peli"); |
---|
38 | |
---|
39 | Mouse.IsCursorVisible = true; |
---|
40 | |
---|
41 | UI.Menu("TESTMODE", new string[] { "START", "EXIT" }, MainMenuHandler); |
---|
42 | } |
---|
43 | |
---|
44 | <<<<<<< .mine |
---|
45 | public void MainMenuHandler(int selected) |
---|
46 | { |
---|
47 | if (selected == 1) |
---|
48 | { |
---|
49 | Exit(); |
---|
50 | } |
---|
51 | } |
---|
52 | |
---|
53 | ======= |
---|
54 | |
---|
55 | public void createBrain1() |
---|
56 | { |
---|
57 | FollowerBrain brain1 = new FollowerBrain("Player"); |
---|
58 | brain1.Speed = 100; |
---|
59 | brain1.Active = true; |
---|
60 | } |
---|
61 | |
---|
62 | >>>>>>> .r4369 |
---|
63 | IntMeter scoreboard; |
---|
64 | void ScoreMeter() |
---|
65 | { |
---|
66 | scoreboard = new IntMeter(0); |
---|
67 | scoreboard.AddOverTime(100, 1); |
---|
68 | |
---|
69 | Label ScoreScreen = new Label(); |
---|
70 | ScoreScreen.X = 0; |
---|
71 | ScoreScreen.Y = Screen.Bottom + 100; |
---|
72 | ScoreScreen.TextColor = Color.Black; |
---|
73 | ScoreScreen.Color = Color.White; |
---|
74 | ScoreScreen.BindTo(scoreboard); |
---|
75 | Add(ScoreScreen); |
---|
76 | } |
---|
77 | |
---|
78 | protected override void Update(Microsoft.Xna.Framework.GameTime gameTime) |
---|
79 | { |
---|
80 | |
---|
81 | base.Update(gameTime); |
---|
82 | } |
---|
83 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.