Create FPS Test minigame with other shit
This commit is contained in:
22
code/Minigames/FpsTest/PawnPropertyProxyComponent.cs
Normal file
22
code/Minigames/FpsTest/PawnPropertyProxyComponent.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.ComponentModel;
|
||||
using LuckerGame.Entities;
|
||||
using Sandbox;
|
||||
|
||||
namespace LuckerGame.Minigames.FpsTest;
|
||||
|
||||
/// <summary>
|
||||
/// Component attached to a Lucker that will allow us to use [ClientInput] in the actual minigame's Pawn.
|
||||
/// </summary>
|
||||
/// <
|
||||
/// <para>
|
||||
/// This is because [ClientInput] only works for the Pawn owned by the Client (Lucker), and the Lucker's components.
|
||||
/// We create this component in the Minigame's Pawn, attach it to the Lucker, and use these properties from there.
|
||||
/// </para>
|
||||
public class PawnPropertyProxyComponent : EntityComponent<Lucker>
|
||||
{
|
||||
[ClientInput]
|
||||
public Vector3 InputDirection { get; set; }
|
||||
|
||||
[ClientInput]
|
||||
public Angles ViewAngles { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user