-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathStartMenu.cs
62 lines (48 loc) · 1.21 KB
/
StartMenu.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
using System;
namespace Nitemare3D
{
public class StartMenu : Scene
{
Pcx menu = new Pcx(Dat.Uif[ImageConsts.MENU_MAIN]);
Pcx start = new Pcx(Dat.Uif[ImageConsts.MENU_STARTSCREEN]);
float blinkTimer = 0;
const int bpm = 126;
const float blinkTime = 60f / bpm;
void Blink()
{
}
bool canStart = false;
public override void Update()
{
if (blinkTimer > blinkTime)
{
canStart = true;
}
blinkTimer += Time.dt;
if (Input.IsKeyDown(KeyboardKey.Enter) && canStart)
{
FadeOut(Scene.LEVEL_MAINMENU, .5f);
}
}
public override bool Equals(object obj)
{
return base.Equals(obj);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override string ToString()
{
return base.ToString();
}
public override void Load()
{
songid = MidiConsts.MIDI_HAUNTED_HOUSE_THEME;
pcx = start;
}
public override void UnLoad()
{
}
}
}