-
Notifications
You must be signed in to change notification settings - Fork 0
/
Levels.cs
46 lines (45 loc) · 1.47 KB
/
Levels.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using System;
using System.Collections.Generic;
public static class Levels {
public enum Lvl {Easy, Medium, Hard};
public enum Info {Speed, MaxSpeed, MinSpeed, ArrowInterval, InitialHealth, LoseHealthSpeed};
public static Lvl SelectedLevel = Lvl.Easy;
public static int getLevelInfo(Info info) {
if (SelectedLevel == Lvl.Easy) {
var ret = new Dictionary<Info, int>
{
{ Info.Speed, 150 },
{ Info.MaxSpeed, 900 },
{ Info.MinSpeed, 60 },
{ Info.LoseHealthSpeed, 1},
{ Info.ArrowInterval, 20},
{ Info.InitialHealth, 10}
};
return ret[info];
}
else if (SelectedLevel == Lvl.Medium) {
var ret = new Dictionary<Info, int>
{
{ Info.Speed, 200 },
{ Info.MaxSpeed, 900 },
{ Info.MinSpeed, 80 },
{ Info.LoseHealthSpeed, 2},
{ Info.ArrowInterval, 40},
{ Info.InitialHealth, 6}
};
return ret[info];
}
else {
var ret = new Dictionary<Info, int>
{
{ Info.Speed, 300 },
{ Info.MaxSpeed, 900 },
{ Info.MinSpeed, 300 },
{ Info.LoseHealthSpeed, 3},
{ Info.ArrowInterval, 60},
{ Info.InitialHealth, 4}
};
return ret[info];
}
}
}