MultiplayerSceneProperties() { players = new List <Pair <byte, GameObject> >(); TransformsUpdateQue = new TransformUpdateQue(); ActionsQue = new PlayerActionQue(); VariablesQue = new ServerVariablesQue(); }
// Checks MultiplayerSceneProperties's transform update que. // Applies the transforms we acquired from the server to each player. // Detects new players, we need to spawn locally from the transform update que. // Detects disconnected users, we needs to destroy locally. private void ApplyTransformUpdateQue() { TransformUpdateQue tuq = MultiplayerSceneProperties.Instance.TransformsUpdateQue; MultiplayerSceneProperties sceneProps = MultiplayerSceneProperties.Instance; ref List <byte> prevPlayerList = ref sceneProps.previousPlayerList;