Create Player script

This commit is contained in:
in0finite 2019-04-24 19:17:40 +02:00
parent 65bbc394b5
commit 06a2dc4c5f
2 changed files with 43 additions and 0 deletions

View file

@ -0,0 +1,32 @@
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(); } }
void OnEnable()
{
s_allPlayers.Add(this);
}
void OnDisable()
{
s_allPlayers.Remove(this);
}
void Start()
{
}
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 44df51f4023494b6daf499c76c834403
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: