public static NetMessage SendTo(ShuttleConsole shuttleConsole, bool state, ConnectedPlayer connectedPlayer) { NetMessage msg = new NetMessage { shuttleConsoleUINT = shuttleConsole.netId, State = state }; SendTo(connectedPlayer, msg); return(msg); }
private IEnumerator WaitForProvider() { while (Provider == null) { yield return(WaitFor.EndOfFrame); } shuttleConsole = Provider.GetComponent <ShuttleConsole>(); matrixMove = shuttleConsole.ShuttleMatrixMove; matrixMove.RegisterCoordReadoutScript(CoordReadout); matrixMove.RegisterShuttleGuiScript(this); shuttleFuelSystem = matrixMove.ShuttleFuelSystem; radarList = this["EntryList"] as RadarList; //Not doing this for clients if (IsServer) { shuttleConsole.GUItab = this; radarList.Origin = matrixMove; StartButton.SetValueServer("1"); //Init listeners matrixMove.MatrixMoveEvents.OnStartMovementServer.AddListener(OnStartMovementServer); matrixMove.MatrixMoveEvents.OnStopMovementServer.AddListener(OnStopMovementServer); if (!Waypoint) { Waypoint = new GameObject($"{matrixMove.gameObject.name}Waypoint"); } HideWaypoint(false); rulersColor = Rulers.Value; rayColor = RadarScanRay.Value; crosshairColor = Crosshair.Value; OnStateChange(shuttleConsole.shuttleConsoleState); } }