Пример #1
0
        protected void load_class(Class_Reel_Data data)
        {
            // Sets up actor
            Unit                 = Game_Unit.class_reel_unit();// new Game_Unit(); //Debug
            Unit.actor.name      = data.Name;
            Unit.actor.gender    = data.Gender;
            Unit.actor.class_id  = data.Class_Id;
            Unit.actor.weapon_id = data.Weapon_Id;
            Unit.magic_attack    = Unit.check_magic_attack(Global.data_weapons[data.Weapon_Id], data.Distance);
            Stats                = new int[7];
            for (int i = 0; i < 7; i++)
            {
                int j = i + (Class_Reel_Data.SKIP_LCK && i >= (int)Tactile.Stat_Labels.Lck ? 1 : 0);
                switch (data.Stat_Type)
                {
                case Reel_Generic_Stats.Actor:
                    Game_Actor actor = Global.game_actors[data.Stats[0]];
                    if (j == 0)
                    {
                        Stats[0] = actor.hp;
                    }
                    else
                    {
                        Stats[i] = actor.stat(j);
                    }
                    break;

                case Reel_Generic_Stats.Class:
                    Data_Class data_class = Global.data_classes[data.Class_Id];
                    Stats[i] = data_class.Generic_Stats[(int)Generic_Builds.Normal][0][j];
                    break;

                case Reel_Generic_Stats.Listed:
                    Stats[i] = data.Stats[j];
                    break;
                }
            }
            Attack_Count = data.Num_Attacks;
            // Platform
            Terrain_Tag = data.Platform;
            string terrain_name = Global.data_terrains[Terrain_Tag].PlatformName;

            if (Global.content_exists(@"Graphics/Battlebacks/" + terrain_name + "-Melee"))
            {
                Platform.platform_1 = Global.Content.Load <Texture2D>(@"Graphics/Battlebacks/" + terrain_name + "-Melee");
            }
            else
            {
                Platform.platform_1 = Global.Content.Load <Texture2D>(@"Graphics/Battlebacks/" + "Plains" + "-Melee");
            }
            Platform.platform_2 = Platform.platform_1;
        }