aboutsummaryrefslogtreecommitdiffstats
path: root/code/pawn/component/camera/BaseCameraComponent.cs
blob: 401d702769172aa00b18ad4892765b9156b9c3f2 (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
using Sandbox;

namespace MurderGame;

public class BaseCameraComponent : EntityComponent<Player>, ISingletonComponent
{

	public virtual void Simulate( IClient cl )
	{

	}
	public virtual void FrameSimulate( IClient cl )
	{

	}
	public virtual void BuildInput()
	{

	}

	public virtual InventoryComponent GetObservedInventory()
	{
		return Entity.Inventory;
	}
	
	public virtual float GetObservedHealth()
	{
		return Entity.Health;
	}

	public virtual Team GetObservedTeam()
	{
		return Entity.Team;	
	}
	
	public virtual string GetObservedName()
	{
		var characterName = Entity.CharacterName;
		return string.IsNullOrWhiteSpace( characterName ) ? Entity.Client.Name : characterName;
	}
	
	public virtual string GetObservedColour()
	{
		return Entity.HexColor;	
	}
}