23 lines
503 B
C#
23 lines
503 B
C#
using UnityEngine;
|
|
|
|
namespace Unheimlich.Gameplay.Player
|
|
{
|
|
/// <summary>
|
|
/// Singleton player reference accessible globally throughout the game.
|
|
/// </summary>
|
|
public class Player : MonoBehaviour
|
|
{
|
|
public static Player Instance { get; private set; }
|
|
|
|
private void Awake()
|
|
{
|
|
if (Instance != null && Instance != this)
|
|
{
|
|
Destroy(this);
|
|
return;
|
|
}
|
|
Instance = this;
|
|
}
|
|
}
|
|
}
|