internal ScenarioStartingEquipmentBlockBase(BinaryReader binaryReader) { this.flags = (Flags)binaryReader.ReadInt32(); this.gameType1 = (GameType1)binaryReader.ReadInt16(); this.gameType2 = (GameType2)binaryReader.ReadInt16(); this.gameType3 = (GameType3)binaryReader.ReadInt16(); this.gameType4 = (GameType4)binaryReader.ReadInt16(); this.invalidName_ = binaryReader.ReadBytes(48); this.itemCollection1 = binaryReader.ReadTagReference(); this.itemCollection2 = binaryReader.ReadTagReference(); this.itemCollection3 = binaryReader.ReadTagReference(); this.itemCollection4 = binaryReader.ReadTagReference(); this.itemCollection5 = binaryReader.ReadTagReference(); this.itemCollection6 = binaryReader.ReadTagReference(); this.invalidName_0 = binaryReader.ReadBytes(48); }
/// <summary> /// 対局保存のコマンド実行 /// </summary> public void GenerateGame() { var dialogRet = MessageBox.Show("対局を保存します。", "確認", System.Windows.MessageBoxButton.YesNo, System.Windows.MessageBoxImage.Information); if (dialogRet == System.Windows.MessageBoxResult.Yes) { // 保存オブジェクトを作る ThisGame = new GameType4() { GameDate = GameDate, SettingID = SelectedRule.ID, East = SelectedPersonEast.ID, EastScore = EastPriseScore, South = SelectedPersonSouth.ID, SouthScore = SouthPriseScore, West = SelectedPersonWest.ID, WestScore = WestPriseScore, North = SelectedPersonNorth.ID, NorthScore = NorthPriseScore }; // クラスを作って var directRegisterModel = new DirectRegisterModel() { // オブジェクトを渡して ColGame = ColGame }; // 動かして directRegisterModel.ExecuteSave(ThisGame); // 戻す ColGame = directRegisterModel.ColGame; // XMLファイルに保存 // ViewModelで読み込むので保存も収まりよくこちらに if (XmlConverter.SerializeFromCol(ColGame, filePathGames)) { // 成功 } else { // 失敗 } } }
internal ScenarioPlayersBlockBase(BinaryReader binaryReader) { this.position = binaryReader.ReadVector3(); this.facingDegrees = binaryReader.ReadSingle(); this.teamDesignator = (TeamDesignator)binaryReader.ReadInt16(); this.bSPIndex = binaryReader.ReadInt16(); this.gameType1 = (GameType1)binaryReader.ReadInt16(); this.gameType2 = (GameType2)binaryReader.ReadInt16(); this.gameType3 = (GameType3)binaryReader.ReadInt16(); this.gameType4 = (GameType4)binaryReader.ReadInt16(); this.spawnType0 = (SpawnType0)binaryReader.ReadInt16(); this.spawnType1 = (SpawnType1)binaryReader.ReadInt16(); this.spawnType2 = (SpawnType2)binaryReader.ReadInt16(); this.spawnType3 = (SpawnType3)binaryReader.ReadInt16(); this.eMPTYSTRING = binaryReader.ReadStringID(); this.eMPTYSTRING0 = binaryReader.ReadStringID(); this.campaignPlayerType = (CampaignPlayerType)binaryReader.ReadInt16(); this.invalidName_ = binaryReader.ReadBytes(6); }
internal ScenarioNetgameEquipmentBlockBase(BinaryReader binaryReader) { this.flags = (Flags)binaryReader.ReadInt32(); this.gameType1 = (GameType1)binaryReader.ReadInt16(); this.gameType2 = (GameType2)binaryReader.ReadInt16(); this.gameType3 = (GameType3)binaryReader.ReadInt16(); this.gameType4 = (GameType4)binaryReader.ReadInt16(); this.invalidName_ = binaryReader.ReadBytes(2); this.spawnTimeInSeconds0Default = binaryReader.ReadInt16(); this.respawnOnEmptyTimeSeconds = binaryReader.ReadInt16(); this.respawnTimerStarts = (RespawnTimerStarts)binaryReader.ReadInt16(); this.classification = (Classification)binaryReader.ReadByte(); this.invalidName_0 = binaryReader.ReadBytes(3); this.invalidName_1 = binaryReader.ReadBytes(40); this.position = binaryReader.ReadVector3(); this.orientation = new ScenarioNetgameEquipmentOrientationStructBlock(binaryReader); this.itemVehicleCollection = binaryReader.ReadTagReference(); this.invalidName_2 = binaryReader.ReadBytes(48); }
public ScenarioStartingEquipmentBlock(BinaryReader binaryReader) { this.flags = (Flags)binaryReader.ReadInt32(); this.gameType1 = (GameType1)binaryReader.ReadInt16(); this.gameType2 = (GameType2)binaryReader.ReadInt16(); this.gameType3 = (GameType3)binaryReader.ReadInt16(); this.gameType4 = (GameType4)binaryReader.ReadInt16(); this.padding = binaryReader.ReadBytes(48); this.itemCollection1 = binaryReader.ReadTagReference(); this.itemCollection2 = binaryReader.ReadTagReference(); this.itemCollection3 = binaryReader.ReadTagReference(); this.itemCollection4 = binaryReader.ReadTagReference(); this.itemCollection5 = binaryReader.ReadTagReference(); this.itemCollection6 = binaryReader.ReadTagReference(); this.padding0 = binaryReader.ReadBytes(48); }
public ScenarioNetgameEquipmentBlock(BinaryReader binaryReader) { this.flags = (Flags)binaryReader.ReadInt32(); this.gameType1 = (GameType1)binaryReader.ReadInt16(); this.gameType2 = (GameType2)binaryReader.ReadInt16(); this.gameType3 = (GameType3)binaryReader.ReadInt16(); this.gameType4 = (GameType4)binaryReader.ReadInt16(); this.padding = binaryReader.ReadBytes(2); this.spawnTimeInSeconds0Default = binaryReader.ReadInt16(); this.respawnOnEmptyTimeSeconds = binaryReader.ReadInt16(); this.respawnTimerStarts = (RespawnTimerStarts)binaryReader.ReadInt16(); this.classification = (Classification)binaryReader.ReadByte(); this.padding0 = binaryReader.ReadBytes(3); this.padding1 = binaryReader.ReadBytes(40); this.position = binaryReader.ReadVector3(); this.orientation = new ScenarioNetgameEquipmentOrientationStruct(binaryReader); this.itemVehicleCollection = binaryReader.ReadTagReference(); this.padding2 = binaryReader.ReadBytes(48); }
public ScenarioPlayersBlock(BinaryReader binaryReader) { this.position = binaryReader.ReadVector3(); this.facingDegrees = binaryReader.ReadSingle(); this.teamDesignator = (TeamDesignator)binaryReader.ReadInt16(); this.bSPIndex = binaryReader.ReadInt16(); this.gameType1 = (GameType1)binaryReader.ReadInt16(); this.gameType2 = (GameType2)binaryReader.ReadInt16(); this.gameType3 = (GameType3)binaryReader.ReadInt16(); this.gameType4 = (GameType4)binaryReader.ReadInt16(); this.spawnType0 = (SpawnType0)binaryReader.ReadInt16(); this.spawnType1 = (SpawnType1)binaryReader.ReadInt16(); this.spawnType2 = (SpawnType2)binaryReader.ReadInt16(); this.spawnType3 = (SpawnType3)binaryReader.ReadInt16(); this.eMPTYSTRING = binaryReader.ReadStringID(); this.eMPTYSTRING0 = binaryReader.ReadStringID(); this.campaignPlayerType = (CampaignPlayerType)binaryReader.ReadInt16(); this.padding = binaryReader.ReadBytes(6); }
/// <summary> /// 対局を保存する /// </summary> public void ExecuteSave(GameType4 game) { ColGame.Add(game); }