コード例 #1
0
ファイル: Objects.cs プロジェクト: mizzouse/FreeInfantry
        /// <summary>
        /// Sends a series of vehicle updates to the specified player
        /// </summary>
        static public void Object_Vehicles(Player p, IEnumerable <Vehicle> update)
        {               //Prepare the packet
            SC_Vehicles vehicles = new SC_Vehicles();

            vehicles.vehicles = update;

            //Send to recipient
            p._client.sendReliable(vehicles);
        }
コード例 #2
0
ファイル: Objects.cs プロジェクト: mizzouse/FreeInfantry
        /// <summary>
        /// Sends a series of vehicle updates to the specified players
        /// </summary>
        static public void Object_Vehicles(IEnumerable <Player> p, IEnumerable <Vehicle> update)
        {               //Prepare the packet
            SC_Vehicles vehicles = new SC_Vehicles();

            vehicles.vehicles = update;

            //Send to each recipient
            foreach (Player player in p)
            {
                player._client.sendReliable(vehicles);
            }
        }