mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-25 15:35:22 +00:00
e9a427f44d
* just formatting * * moved message stuff to new project * generated .gitignore from https://gitignore.io/api/unity,visualstudio * fixed build event for message project * wip * . * . * :S:S:S * fixed working dir thing * fixed gitignore * adding .csproj.user * . * nothing works * fixed gitignore for UnityProject * wonky animation! \o/ * fixed csproj * merge * keeping this line solves the issue of animating local clones * removed trigger case
34 lines
936 B
C#
34 lines
936 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>();
|
|
|
|
var anim = playerPrefab.AddComponent<Animator>();
|
|
playerPrefab.AddComponent<NetworkAnimator>().animator = anim;
|
|
}
|
|
|
|
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>();
|
|
}
|
|
|
|
}
|
|
}
|