mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-15 16:48:00 +00:00
35 lines
742 B
C#
35 lines
742 B
C#
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using Mirror;
|
|
|
|
namespace SanAndreasUnity.Net
|
|
{
|
|
|
|
public class Player : NetworkBehaviour
|
|
{
|
|
|
|
static List<Player> s_allPlayers = new List<Player>();
|
|
public static Player[] AllPlayers { get { return s_allPlayers.ToArray(); } }
|
|
|
|
[SyncVar] GameObject m_ownedGameObject;
|
|
public GameObject OwnedGameObject { get { return m_ownedGameObject; } internal set { m_ownedGameObject = value; } }
|
|
|
|
|
|
void OnEnable()
|
|
{
|
|
s_allPlayers.Add(this);
|
|
}
|
|
|
|
void OnDisable()
|
|
{
|
|
s_allPlayers.Remove(this);
|
|
}
|
|
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|