2 using System.Collections.Generic;
18 Koira koira =
new Koira(
this,200, Vector.Zero,
"Musti");
19 LuoOhjaimet(koira, 100, Key.Up, Key.Down, Key.Left, Key.Right);
21 Kissa kissa =
new Kissa(
this,200,
new Vector(100,200),
"Mirri");
22 LuoOhjaimet(kissa, 100, Key.W, Key.Z, Key.A, Key.S);
24 Timer timer =
new Timer();
25 timer.Interval = 0.500;
29 Level.CreateBorders();
32 PhoneBackButton.Listen(ConfirmExit,
"Lopeta peli");
33 Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit,
"Lopeta peli");
34 Keyboard.Listen(Key.F1, ButtonState.Pressed, ShowControlHelp,
"Avustus");
43 Keyboard.Listen(up, ButtonState.Down, elain.
Liiku, elain.
Nimi +
" up",
new Vector(0, voima));
44 Keyboard.Listen(down, ButtonState.Down, elain.
Liiku, elain.
Nimi +
" down",
new Vector(0, -voima));
45 Keyboard.Listen(left, ButtonState.Down, elain.
Liiku, elain.
Nimi +
" left",
new Vector(-voima, 0));
46 Keyboard.Listen(right, ButtonState.Down, elain.
Liiku, elain.
Nimi +
" right",
new Vector(voima, 0));
53 var juusto =
new Juusto(
this, 50, RandomGen.NextVector(Level.BoundingRect));
54 var hiiri =
new Hiiri(
this, 70, RandomGen.NextVector(Level.BoundingRect),juusto);