private void LoadReplayInfo() { // Init OperationBluehole.Content.ContentsPrepare.Init(); OperationBluehole.Content.Player[] players = { new OperationBluehole.Content.Player(), new OperationBluehole.Content.Player(), new OperationBluehole.Content.Player(), new OperationBluehole.Content.Player() }; // Warning!!! There is no information about mobPartyLevel in simulation result. // use temp variable int tempMobPartyLevel = 3; OperationBluehole.Content.Party playerParty = new OperationBluehole.Content.Party(OperationBluehole.Content.PartyType.PLAYER, tempMobPartyLevel); for (int i = 0; i < DataManager.Instance.latestSimulationResult.playerList.Count; ++i) { if (DataManager.Instance.latestSimulationResult.playerList[i] == null) { Debug.LogError("No Player " + i); } players[i].LoadPlayer(DataManager.Instance.latestSimulationResult.playerList[i]); playerParty.AddCharacter(players[i]); } LogGenerator.Instance.GenerateLog( DataManager.Instance.latestSimulationResult.mapSize, DataManager.Instance.latestSimulationResult.randomSeed, playerParty ); }
static void TestSimulation(int seed) { // 던전 테스트-------- Player[] player = { new Player(), new Player(), new Player(), new Player() }; PlayerData data = new PlayerData(); if (TestData.playerList.TryGetValue(102, out data)) { player[0].LoadPlayer(data); } if (TestData.playerList.TryGetValue(103, out data)) { player[1].LoadPlayer(data); } if (TestData.playerList.TryGetValue(104, out data)) { player[2].LoadPlayer(data); } if (TestData.playerList.TryGetValue(101, out data)) { player[3].LoadPlayer(data); } var start = time.ElapsedMilliseconds; Party users = new Party(PartyType.PLAYER, 1); foreach (Player p in player) { users.AddCharacter(p); } DungeonMaster newMaster = new DungeonMaster(); newMaster.Init(60, seed, users); UpdateResult(newMaster.Start(), time.ElapsedMilliseconds - start); // 초기 정보 확인 // var mapInfo = newMaster.GetMapInfo(); // var itemList = newMaster.items; // var mobList = newMaster.mobs; // newMaster.TestPathFinding(); // Console.ReadLine(); // Debug.WriteLine( "turn : " + newMaster.Start() ); // 시뮬레이션 결과 확인 // foreach( var each in newMaster.record.pathfinding ) // { // Debug.WriteLine( "x : " + each.x + " / y : " + each.y ); // } // // ------------------ }
// FOR DEBUG private Party TempMobGenerator() { Mob[] mob = { new Mob(MobGenerator.GetMobData(random, MobType.ZombieFatty, 10)), new Mob(MobGenerator.GetMobData(random, MobType.ZombieFatty, 10)), new Mob(MobGenerator.GetMobData(random, MobType.ZombieFatty, 10)) }; Party mobs = new Party(PartyType.MOB, 10); foreach (Mob p in mob) { mobs.AddCharacter(p); } return(mobs); }
private Party GeneratoMobParty() { Party mobs = new Party(PartyType.MOB, usersLevel); // mob 생성해서 추가할 것 for (int j = 0; j < Config.MAX_PARTY_MEMBER; ++j) { // 조심해! // 몹타입에 따라서 Mob을 상속받아서 구현한다면 // 여기서 타입도 결정해서 그에 맞게 생성해주어야 한다 MobData newMobData = MobGenerator.GetMobData(random, (MobType)random.Next(1, (int)MobType.Length), (ushort)(usersLevel + random.Next( (int)(-usersLevel * Config.LEVEL_RANGE), (int)(usersLevel * Config.LEVEL_RANGE))) ); Mob mob = new Mob(newMobData); mobs.AddCharacter(mob); } return(mobs); }