private void InitializeLocalPlayerState() { ILocalNitroxPlayer localPlayer = NitroxServiceLocator.LocateService <ILocalNitroxPlayer>(); PlayerModelDirector playerModelDirector = new PlayerModelDirector(localPlayer); playerModelDirector .AddDiveSuit(); playerModelDirector.Construct(); }
private IEnumerator InitializeLocalPlayerState() { ILocalNitroxPlayer localPlayer = NitroxServiceLocator.LocateService <ILocalNitroxPlayer>(); IEnumerable <IColorSwapManager> colorSwapManagers = NitroxServiceLocator.LocateService <IEnumerable <IColorSwapManager> >(); ColorSwapAsyncOperation swapOperation = new ColorSwapAsyncOperation(localPlayer, colorSwapManagers).BeginColorSwap(); yield return(new WaitUntil(() => swapOperation.IsColorSwapComplete())); swapOperation.ApplySwappedColors(); }
private IEnumerator InitializeLocalPlayerState() { ILocalNitroxPlayer localPlayer = NitroxServiceLocator.LocateService <ILocalNitroxPlayer>(); IEnumerable <IColorSwapManager> colorSwapManagers = NitroxServiceLocator.LocateService <IEnumerable <IColorSwapManager> >(); ColorSwapAsyncOperation swapOperation = new ColorSwapAsyncOperation(localPlayer, colorSwapManagers).BeginColorSwap(); yield return(new WaitUntil(() => swapOperation.IsColorSwapComplete())); swapOperation.ApplySwappedColors(); // UWE developers added noisy logging for non-whitelisted components during serialization. // We add NitroxEntiy in here to avoid a large amount of log spam. ProtobufSerializer.componentWhitelist.Add(nameof(NitroxEntity)); }
private IEnumerator InitializeLocalPlayerState() { ILocalNitroxPlayer localPlayer = NitroxServiceLocator.LocateService <ILocalNitroxPlayer>(); IEnumerable <IColorSwapManager> colorSwapManagers = NitroxServiceLocator.LocateService <IEnumerable <IColorSwapManager> >(); ColorSwapAsyncOperation swapOperation = new ColorSwapAsyncOperation(localPlayer, colorSwapManagers).BeginColorSwap(); yield return(new WaitUntil(() => swapOperation.IsColorSwapComplete())); swapOperation.ApplySwappedColors(); // UWE developers added noisy logging for non-whitelisted components during serialization. // We add NitroxEntiy in here to avoid a large amount of log spam. HashSet <string> whiteListedSerializableComponents = (HashSet <string>)ReflectionHelper.ReflectionGet <ProtobufSerializer>(null, "componentWhitelist", false, true); whiteListedSerializableComponents.Add("NitroxEntity"); }
public void ResetModel(ILocalNitroxPlayer localPlayer) { Body = Object.Instantiate(localPlayer.BodyPrototype); Body.SetActive(true); PlayerModel = Body.RequireGameObject("player_view"); }
public PlayerManager(IPacketSender packetSender, ILocalNitroxPlayer localPlayer, PlayerModelManager playerModelManager) { this.packetSender = packetSender; this.localPlayer = localPlayer; this.playerModelManager = playerModelManager; }
public PlayerManager(ILocalNitroxPlayer localPlayer) { this.localPlayer = localPlayer; }
public PlayerManager(ILocalNitroxPlayer localPlayer, PlayerModelManager playerModelManager) { this.localPlayer = localPlayer; this.playerModelManager = playerModelManager; }