コード例 #1
0
ファイル: ShipManager.cs プロジェクト: bsed/Freecon-Galactic
        /// <summary>
        /// Changes IShip and notifies client.
        /// </summary>
        /// <param name="s">Ship of the player</param>
        /// <param name="shs">Ship to switch to</param>
        /// <param name="w">Weapon to switch to</param>
        public void ChangePlayersShip(IShip s, ShipStats shs)
        {
            s.ChangeShipType(shs);
            var data = s.GetNetworkData(false, false, false, true);

            s.GetPlayer().SendMessage(new NetworkMessageContainer(data, MessageTypes.ChangeShipType));
        }