Esempio n. 1
0
        public static void Broadcast(Cutscene cutscene)
        {
            if (Main.netMode != NetmodeID.MultiplayerClient)
            {
                throw new ModHelpersException("Not client");
            }

            CutsceneStartProtocol protocol = cutscene.CreatePacketPayload();

            NetIO.Broadcast(protocol);
        }
Esempio n. 2
0
        public static void SendToClients(Cutscene cutscene, int ignoreWho)
        {
            if (Main.netMode != NetmodeID.Server)
            {
                throw new ModHelpersException("Not server");
            }

            CutsceneStartProtocol protocol = cutscene.CreatePacketPayload();

            NetIO.SendToClients(
                data: protocol,
                ignoreWho: ignoreWho
                );
        }