blob: 7751a3837badc35ecf070fa841eb3e99da669f93 (
plain)
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
@namespace MurderGame
@inherits Sandbox.UI.Panel
<style>
@@keyframes fadeIn
{
0% { opacity: 0; }
100% { opacity: 1; }
}
@@keyframes blurIn
{
0% { opacity: 0; }
100% { opacity: 1; }
}
deathoverlay {
}
.overlay {
position: absolute;
left: 0;
top: 0;
width: 100vw;
height: 100vh;
}
.fade {
opacity: 0;
background-color: rgb(0, 0, 0);
animation-name: fadeIn;
animation-duration: 0.5s;
animation-delay: 1.5s;
animation-iteration-count: 1;
animation-timing-function: ease-in;
animation-fill-mode: forwards;
}
.blur {
opacity: 0;
backdrop-filter-blur: 32px;
animation-name: fadeIn;
animation-duration: 1.5s;
animation-iteration-count: 1;
animation-timing-function: ease-in;
animation-fill-mode: forwards;
}
.box {
backdrop-filter-blur: 8px;
background-color: rgba(0, 0, 0, 0.20);
padding: 10px;
color: white;
font-weight: 700;
font-size: 35px;
font-family: "Roboto";
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 300px;
}
.box-container {
position: absolute;
left: 0;
top: 0;
width: 100vw;
height: 100vh;
display: flex;
align-items: center;
justify-content: flex-end;
flex-direction: column;
}
</style>
@if (ShowOverlay)
{
<div class="overlay fade">
</div>
<div class="overlay blur">
</div>
<div class="box-container">
<div class="box">
You have died
</div>
</div>
}
@code
{
public static DeathOverlay Instance { get; private set; }
public DeathOverlay()
{
Instance = this;
}
public bool ShowOverlay { get; set; }
protected override int BuildHash()
{
return ShowOverlay.GetHashCode();
}
}
|