예제 #1
0
        private void StartLoad(_DTO_begin_fight dto)
        {
            int count = dto.players.Length;

            string[] players = new string[count];
            for (int i = 0; i < count; i++)
            {
                players[i] = dto.players[i].cid;
            }

            BattleData battleData = ModelFactory.GetBattleData(dto.map);

            count = battleData.neutrals.Count;
            string[] neutrals = new string[count];
            int      j        = 0;

            foreach (KeyValuePair <string, BattleData.Neutral> kv in battleData.neutrals)
            {
                neutrals[j++] = kv.Value.id;
            }

            count = battleData.structures.Count;
            string[] structures = new string[count];
            j = 0;
            foreach (KeyValuePair <string, BattleData.Structure> kv in battleData.structures)
            {
                structures[j++] = kv.Value.id;
            }

            MapLoadHelper.Preload(dto.map, players, neutrals, structures, this.OnLoadComplete, this.OnLoadProgress, this.OnLoadError);
        }
예제 #2
0
 private void OnEnterBattle(Packet packet)
 {
     MapLoadHelper.BeginSceneActivation(this.OnSceneActived, packet);
 }