Пример #1
0
 internal Gameplay_Metrics(Gameplay_Metrics other)
 {
     StartingActors = other.StartingActors.Select(x => new Actor_Metrics(x)).ToList();
     Combats        = other.Combats.Select(x => new Combat_Metrics(x)).ToList();
     Items          = other.Items.Select(x => new Item_Metrics(x)).ToList();
     EndingActors   = other.EndingActors.Select(x => new Actor_Metrics(x)).ToList();
 }
Пример #2
0
        public static Gameplay_Metrics read(BinaryReader reader)
        {
            Version v = reader.ReadVersion();

            Gameplay_Metrics metrics = new Gameplay_Metrics();

            metrics.StartingActors.read(reader);
            metrics.Combats.read(reader);
            metrics.Items.read(reader);
            metrics.EndingActors.read(reader);
            return(metrics);
        }
Пример #3
0
        internal static Gameplay_Metrics from_query_string(string query)
        {
            // Convert hex string into byte stream
            byte[] data = Enumerable.Range(0, query.Length / 2).Select(x => Convert.ToByte(query.Substring(x * 2, 2), 16)).ToArray();
            using (MemoryStream ms = new MemoryStream())
            {
                using (MemoryStream compressed_stream = new MemoryStream(data))
                    using (DeflateStream decompressor = new DeflateStream(compressed_stream, CompressionMode.Decompress))
                        decompressor.CopyTo(ms);

                ms.Position = 0;
                using (BinaryReader reader = new BinaryReader(ms))
                {
                    return(Gameplay_Metrics.read(reader));
                }
            }
        }
Пример #4
0
        private void initialize()
        {
            Metrics = new Metrics.Gameplay_Metrics();

            AiState         = new Game_Ai_State();
            BlockState      = new Game_Block_State();
            ChapterEndState = new Game_Chapter_End_State();
            CombatState     = new Game_Combat_State();
            ExpState        = new Game_Exp_State();
            ItemState       = new Game_Item_State();
            RescueState     = new Game_Rescue_State();
            ShopState       = new Game_Shop_Suspend_State();
            SkillsState     = new Game_Skills_State();
            SupportState    = new Game_Support_State();
            TalkState       = new Game_Talk_State();
            VisitState      = new Game_Visit_State();

            hook_events();
        }
Пример #5
0
        internal Metrics_Data(Gameplay_Metrics gameplay)
        {
            Chapter        = Global.game_system.chapter_id;
            StartTime      = Global.game_system.chapter_start_time;
            Difficulty     = Global.game_system.Difficulty_Mode;
            Style          = Global.game_system.Style;
            PlayTime       = Global.game_system.chapter_play_time;
            RankTurns      = Global.game_system.chapter_turn;
            RankCombat     = Global.game_system.chapter_damage_taken;
            RankExp        = Global.game_system.chapter_exp_gain;
            RankCompletion = Global.game_system.chapter_completion;
            RankSurvival   = Global.game_system.chapter_deaths;
            Deployed       = Global.game_system.deployed_unit_count;
            DeployedLvl    = Global.game_system.deployed_unit_avg_level;
            Battalion      = Global.battalion.actors.Count;
            BattalionLvl   = Global.battalion.average_level;

            GameplayStartTime = Global.game_system.gameplay_start_time;

            Gameplay = gameplay;
        }