mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-25 15:35:22 +00:00
0e9bfdd9ae
* cleanup of animation sync * smooth animations
32 lines
855 B
C#
32 lines
855 B
C#
using UnityEngine;
|
|
using UnityEngine.Networking;
|
|
|
|
namespace QSB
|
|
{
|
|
public class QSBNetworkManager : NetworkManager
|
|
{
|
|
private void Awake()
|
|
{
|
|
var assetBundle = QSB.Helper.Assets.LoadBundle("assets/network");
|
|
playerPrefab = assetBundle.LoadAsset<GameObject>("assets/networkplayer.prefab");
|
|
playerPrefab.AddComponent<NetworkPlayer>();
|
|
playerPrefab.AddComponent<AnimationSync>();
|
|
}
|
|
|
|
public override void OnStartServer()
|
|
{
|
|
WakeUpSync.IsServer = true;
|
|
}
|
|
|
|
public override void OnClientConnect(NetworkConnection conn)
|
|
{
|
|
base.OnClientConnect(conn);
|
|
|
|
DebugLog.Screen("OnClientConnect");
|
|
gameObject.AddComponent<WakeUpSync>();
|
|
gameObject.AddComponent<SectorSync>();
|
|
}
|
|
|
|
}
|
|
}
|