Create FPS Test minigame with other shit

This commit is contained in:
Keenan Turley
2023-08-03 21:32:33 -07:00
parent bdb25fd3ce
commit 97a2442d03
15 changed files with 758 additions and 13 deletions

View File

@@ -1,3 +1,4 @@
@using System
@using LuckerGame.Components.Lucker.Cameras
@using Sandbox
@using Sandbox.UI
@@ -5,12 +6,19 @@
@attribute [StyleSheet]
@inherits Panel
@if (ShouldShowCursor)
{
<root/>
}
<root>
@if (ShouldShowCursor)
{
<div class="cursor-catch"></div>
}
</root>
@code {
protected override int BuildHash()
{
return HashCode.Combine(ShouldShowCursor);
}
private bool ShouldShowCursor => Game.LocalClient.Pawn?.Components.Get<AbstractCamera>()?.ShouldShowCursor ?? false;
}