Ejemplo n.º 1
0
    public override void BoltStartDone()
    {
        if (SteamHub.LobbyActive != null && SteamManager.Initialized)
        {
            BoltNetwork.RegisterTokenClass <SteamToken>();

            Debug.Log("enteredGame");
            string enterMessage    = "enteredGame" + SteamUser.GetSteamID();
            byte[] enterMsgAsBytes = Encoding.ASCII.GetBytes(enterMessage);
            SteamMatchmaking.SendLobbyChatMsg(SteamHub.LobbyActive.LobbyId, enterMsgAsBytes, enterMsgAsBytes.Length + 1);

            if (GameObject.Find("Main Camera").GetComponent <SteamLobby>().isOwner())
            {
                BoltNetwork.LoadScene(LocalData.ServerScene);
            }
            else
            {
#if !BOLT_CLOUD
                var token = new SteamToken();
                Debug.Log(SteamUser.GetSteamID().m_SteamID);
                token.SteamID = SteamUser.GetSteamID().m_SteamID;
                CSteamID serverID = GameObject.Find("Main Camera").GetComponent <SteamLobby>().getGameServerID();
                BoltNetwork.Connect(serverID.ToEndPoint(), token);
#else
                Debug.LogError("This call is only valid on Bolt Server version");
#endif
            }
        }
    }
        public override void BoltStartBegin()
        {
            // Define Reliable Channel
            _textureTransmitChannel = BoltNetwork.CreateStreamChannel(TextureTransmitChannelName, UdpChannelMode.Reliable, 1);

            BoltNetwork.RegisterTokenClass <PlayerTextureMeta>();
        }
Ejemplo n.º 3
0
 protected void BoltSetup()
 {
     BoltNetwork.SetCanReceiveEntities(false);
     BoltNetwork.RegisterTokenClass <CoopConnectToken>();
     BoltNetwork.RegisterTokenClass <CoopConstructionExToken>();
     BoltNetwork.RegisterTokenClass <CoopFloorToken>();
     BoltNetwork.RegisterTokenClass <CoopRoofToken>();
     BoltNetwork.RegisterTokenClass <CoopWallChunkToken>();
     BoltNetwork.RegisterTokenClass <CoopBridgeToken>();
     BoltNetwork.RegisterTokenClass <CoopZiplineToken>();
     BoltNetwork.RegisterTokenClass <CoopZiplineTreeToken>();
     BoltNetwork.RegisterTokenClass <CoopCraneToken>();
     BoltNetwork.RegisterTokenClass <CoopGardenToken>();
     BoltNetwork.RegisterTokenClass <CoopFoundationChunkTierToken>();
     BoltNetwork.RegisterTokenClass <CoopSingleAnchorToken>();
     BoltNetwork.RegisterTokenClass <CoopMutantDummyToken>();
     BoltNetwork.RegisterTokenClass <CoopDestroyTagToken>();
     BoltNetwork.RegisterTokenClass <CoopKickToken>();
     BoltNetwork.RegisterTokenClass <CoopCreateBreakToken>();
     BoltNetwork.RegisterTokenClass <CoopJoinDedicatedServerToken>();
     BoltNetwork.RegisterTokenClass <CoopJoinDedicatedServerFailed>();
     BoltNetwork.RegisterTokenClass <CoopWeaponUpgradesToken>();
     BoltNetwork.RegisterTokenClass <CoopSyncGirlPickupToken>();
     BoltNetwork.RegisterTokenClass <CoopRagdollToken>();
 }
Ejemplo n.º 4
0
        // ----------------- Server callbacks ------------------

        public override void BoltStartBegin()
        {
            BoltConsole.Write("BoltStartBegin breh");
            BoltNetwork.RegisterTokenClass <RoomProtocolToken>();
            BoltNetwork.RegisterTokenClass <ServerAcceptToken>();
            BoltNetwork.RegisterTokenClass <ServerConnectToken>();
        }
 // register all needed tokens
 public override void BoltStartBegin()
 {
     BoltNetwork.RegisterTokenClass <PlayerToken>();
     BoltNetwork.RegisterTokenClass <UserToken>();
     BoltNetwork.RegisterTokenClass <BulletToken>();
     BoltNetwork.RegisterTokenClass <DeathPrefabToken>();
     BoltNetwork.RegisterTokenClass <AudioLibraryToken>();
 }
        // ----------------- Server callbacks ------------------

        public override void BoltStartBegin()
        {
            BoltNetwork.RegisterTokenClass <RoomProtocolToken>();
            BoltNetwork.RegisterTokenClass <ServerAcceptToken>();
            BoltNetwork.RegisterTokenClass <ServerConnectToken>();
            BoltNetwork.RegisterTokenClass <SteamConnectToken>();
            BoltNetwork.RegisterTokenClass <SteamToken>();
        }
Ejemplo n.º 7
0
        public override void BoltStartBegin()
        {
            BoltNetwork.RegisterTokenClass <RoomProtocolToken>();
            BoltNetwork.RegisterTokenClass <ServerAcceptToken>();
            BoltNetwork.RegisterTokenClass <ServerConnectToken>();

            // Uncomment if you want to pass custom properties into your room
            // BoltNetwork.RegisterTokenClass<PhotonCloudRoomProperties>();
        }
        public override void BoltStartBegin()
        {
            BoltNetwork.RegisterTokenClass <RoomProtocolToken>();
            BoltNetwork.RegisterTokenClass <ServerAcceptToken>();
            BoltNetwork.RegisterTokenClass <ServerConnectToken>();

            // Custom properties Token
            BoltNetwork.RegisterTokenClass <PhotonRoomProperties>();
        }
Ejemplo n.º 9
0
        public void Event_BoltStartBegin()
        {
            Log.Info(LogChannel, "[PhotonNetworkInterface] BoltStartBegin");

            // class needed to set room properties
            BoltNetwork.RegisterTokenClass <PhotonRoomProperties>();

            CreateStreamChannels();
        }
Ejemplo n.º 10
0
        public override void BoltStartBegin()
        {
            BoltNetwork.RegisterTokenClass <RoomProtocolToken>();
            BoltNetwork.RegisterTokenClass <ServerAcceptToken>();
            BoltNetwork.RegisterTokenClass <ServerConnectToken>();

            // PhotonRoomProperties is used to pass custom properties into your room
            BoltNetwork.RegisterTokenClass <PhotonRoomProperties>();
        }
Ejemplo n.º 11
0
        // BOLT

        public override void BoltStartBegin()
        {
            if (BoltNetwork.IsServer)
            {
                Debug.Log("[BOLT] Registering tokens.");
                BoltNetwork.RegisterTokenClass <Multiplayer.RoomProtocolToken>();
                BoltNetwork.RegisterTokenClass <LobbyToken>();
                BoltNetwork.RegisterTokenClass <JoinToken>();
            }
        }
Ejemplo n.º 12
0
 public override void BoltStartDone()
 {
     if (BoltNetwork.IsServer)
     {
         BoltNetwork.RegisterTokenClass <PhotonRoomProperties>();
         PhotonRoomProperties token = new PhotonRoomProperties();
         token.AddRoomProperty("roomName", GameObject.FindWithTag("NewRoomNameInputField").GetComponent <TMP_InputField>().text);
         BoltMatchmaking.CreateSession(sessionID: Guid.NewGuid().ToString(), sceneToLoad: "Game", token: token);
     }
 }
        public override void BoltStartBegin()
        {
            base.BoltStartBegin();

            BoltNetwork.RegisterTokenClass <ServerRoomToken>();
            BoltNetwork.RegisterTokenClass <ClientConnectionToken>();
            BoltNetwork.RegisterTokenClass <ClientRefuseToken>();
            BoltNetwork.RegisterTokenClass <SpellProcessingToken>();
            BoltNetwork.RegisterTokenClass <Creature.CreateToken>();
            BoltNetwork.RegisterTokenClass <Player.CreateToken>();
            BoltNetwork.RegisterTokenClass <Player.ControlGainToken>();
        }
Ejemplo n.º 14
0
    public override void BoltStartBegin()
    {
        InitJsonChannel          = BoltNetwork.CreateStreamChannel(InitJsonChannelName, UdpChannelMode.Reliable, 4);
        WaspJsonChannel          = BoltNetwork.CreateStreamChannel(WaspJsonChannelName, UdpChannelMode.Reliable, 4);
        PlayerJsonChannel        = BoltNetwork.CreateStreamChannel(PlayerJsonChannelName, UdpChannelMode.Reliable, 4);
        StreamAggregationChannel = BoltNetwork.CreateStreamChannel(StreamAggregationName, UdpChannelMode.Reliable, 4);
        UpdateAggregationChannel = BoltNetwork.CreateStreamChannel(UpdateAggregationName, UdpChannelMode.Reliable, 4);


        BoltNetwork.RegisterTokenClass <PartToken>();
        BoltNetwork.RegisterTokenClass <PartTokenParent>();
        BoltNetwork.RegisterTokenClass <PartTokenComplex>();
    }
Ejemplo n.º 15
0
    public static void SetLobbyData(LobbyData lobbyData)
    {
        if (BoltNetwork.IsRunning && BoltNetwork.IsServer)
        {
            BoltNetwork.RegisterTokenClass <LobbyToken>();

            LobbyToken token = new LobbyToken().BuildData(lobbyData);
            BoltNetwork.SetServerInfo(lobbyData.ServerName, token);
            Debug.Log("Lobby data set.");
        }
        else
        {
            Debug.LogWarning("Can't set data if Bolt is not running.");
        }
    }
Ejemplo n.º 16
0
    public static void UpdateLobbyData(LobbyData lobbyData)
    {
        if (BoltNetwork.IsRunning && BoltNetwork.IsServer)
        {
            BoltNetwork.RegisterTokenClass <LobbyToken>();

            LobbyToken token = new LobbyToken().BuildData(lobbyData);
            BoltMatchmaking.UpdateSession(token);
            Debug.Log("Lobby data updated.");
        }
        else
        {
            Debug.LogWarning("Can't update data if Bolt is not running.");
        }
    }
Ejemplo n.º 17
0
    public override void OnStartDone()
    {
        base.OnStartDone();

        if (_config.UsePunchThrough)
        {
            _platform.OnStartDone();

            // register token class
            BoltNetwork.RegisterTokenClass <PhotonHostInfoToken>();

            if (BoltNetwork.isClient)
            {
                Bolt.Zeus.Connect();
            }
        }
    }
Ejemplo n.º 18
0
 protected void BoltSetup()
 {
     BoltNetwork.SetCanReceiveEntities(false);
     BoltNetwork.RegisterTokenClass <CoopConnectToken>();
     BoltNetwork.RegisterTokenClass <CoopConstructionExToken>();
     BoltNetwork.RegisterTokenClass <CoopFloorToken>();
     BoltNetwork.RegisterTokenClass <CoopRoofToken>();
     BoltNetwork.RegisterTokenClass <CoopWallChunkToken>();
     BoltNetwork.RegisterTokenClass <CoopBridgeToken>();
     BoltNetwork.RegisterTokenClass <CoopFoundationChunkTierToken>();
     BoltNetwork.RegisterTokenClass <CoopSingleAnchorToken>();
     BoltNetwork.RegisterTokenClass <CoopMutantDummyToken>();
     BoltNetwork.RegisterTokenClass <CoopDestroyTagToken>();
     BoltNetwork.RegisterTokenClass <CoopKickToken>();
     BoltNetwork.RegisterTokenClass <CoopCreateBreakToken>();
     BoltNetwork.RegisterTokenClass <CoopJoinDedicatedServerToken>();
 }
Ejemplo n.º 19
0
    public override void BoltStartDone()
    {
        BoltNetwork.RegisterTokenClass <CredentialToken>();
        BoltNetwork.RegisterTokenClass <SceneChangeToken>();
        BoltNetwork.RegisterTokenClass <UserStatsToken>();
        BoltNetwork.RegisterTokenClass <EndGameToken>();

        if (BoltNetwork.isServer == true)
        {
            BoltNetwork.SetHostInfo("Here", null);
        }

        if (BoltNetwork.isServer == false)
        {
            //BoltNetwork.Connect(UdpKit.UdpEndPoint.Parse(ClientManager.Instance.ConnectIP));
            //BoltNetwork.Connect(UdpKit.UdpEndPoint.Parse(ClientManager.Instance.ConnectIP + ":27000"), ClientManager.Instance.Credentials);
            //UdpKit.UdpEndPoint client = new UdpKit.UdpEndPoint(UdpKit.UdpIPv4Address.Localhost, 27000);
            Debug.Log("connecting...");
            BoltNetwork.Connect(UdpKit.UdpEndPoint.Parse(ClientManager.Instance.ConnectIP + ":27000"), ClientManager.Instance.Credentials);

            //BoltNetwork.Connect(client, ClientManager.Instance.Credentials);
        }
    }
Ejemplo n.º 20
0
 public override void BoltStartBegin()
 {
     BoltNetwork.RegisterTokenClass <Bolt.Photon.PhotonRoomProperties>();
     BoltNetwork.RegisterTokenClass <WeaponDropToken>();
 }
Ejemplo n.º 21
0
 public override void BoltStartBegin() // Line 20 on PhotonInit.cs
 {
     BoltNetwork.RegisterTokenClass <UserToken>();
 }
Ejemplo n.º 22
0
 /// <summary>
 /// Register the PhotonRoomProperties Token to be used on the Session creation
 /// </summary>
 public override void BoltStartBegin()
 {
     // Register PhotonRoomProperties to be used when creating the Photon Session
     BoltNetwork.RegisterTokenClass <PhotonRoomProperties>();
 }
Ejemplo n.º 23
0
 public override void BoltStartBegin()
 {
     BoltNetwork.RegisterTokenClass <TestToken>();
 }
Ejemplo n.º 24
0
 public override void BoltStartBegin()
 {
     _showGui = false;
     BoltNetwork.RegisterTokenClass <PhotonRoomProperties>();
 }
Ejemplo n.º 25
0
 public override void BoltStartDone()
 {
     BoltNetwork.RegisterTokenClass <RoomProtocolToken>();
     BoltNetwork.RegisterTokenClass <OnlineIndexToken>();
 }
Ejemplo n.º 26
0
        // Bolt Events

        public override void BoltStartBegin()
        {
            BoltNetwork.RegisterTokenClass <HitInfo>();
        }
Ejemplo n.º 27
0
 public override void BoltStarted()
 {
     BoltNetwork.RegisterTokenClass <CameraSpawnPoint>();
 }
Ejemplo n.º 28
0
 public static void RegisterTokenClass()
 {
     BoltNetwork.RegisterTokenClass <PhotonHostInfoToken>();
 }
Ejemplo n.º 29
0
 public override void BoltStartBegin()
 {
     // Register any Protocol Token that are you using
     BoltNetwork.RegisterTokenClass <PhotonRoomProperties>();
 }
Ejemplo n.º 30
0
 public override void BoltStartBegin()
 {
     BoltNetwork.RegisterTokenClass <RoomProtocolToken>();
 }