コード例 #1
0
        protected override void initialize_images()
        {
            // Black Screen
            Black_Screen           = new Sprite();
            Black_Screen.texture   = Global.Content.Load <Texture2D>(@"Graphics/White_Square");
            Black_Screen.dest_rect = new Rectangle(0, 0, Config.WINDOW_WIDTH, Config.WINDOW_HEIGHT);
            Black_Screen.tint      = new Color(0, 0, 0, 0);
            // Background
            Background         = new Sprite();
            Background.texture = Global.Content.Load <Texture2D>(@"Graphics/Panoramas/Arena");
            // Darkened Bar
            Darkened_Bar           = new Sprite();
            Darkened_Bar.texture   = Global.Content.Load <Texture2D>(@"Graphics/White_Square");
            Darkened_Bar.dest_rect = new Rectangle(0, 8, Config.WINDOW_WIDTH, 48);
            Darkened_Bar.tint      = new Color(0, 0, 0, 128);
            // Portrait BG
            Portrait_Bg          = new Sprite();
            Portrait_Bg.texture  = Global.Content.Load <Texture2D>(@"Graphics/Windowskins/Shop_Portrait_bg");
            Portrait_Bg.src_rect = new Rectangle(0, 0, 57, 57);
            Portrait_Bg.loc      = new Vector2(12, 4);
            // Gold Window
            Gold_Window         = new Sprite();
            Gold_Window.texture = Global.Content.Load <Texture2D>(@"Graphics/Windowskins/Gold_Window");
            Gold_Window.loc     = new Vector2(212, 48);
            // Gold_Data
            Gold_Data     = new RightAdjustedText();
            Gold_Data.loc = new Vector2(216 + 48, 48);
            Gold_Data.SetFont(Config.UI_FONT, Global.Content, "Blue");
            redraw_gold();
            Gold_G     = new TextSprite();
            Gold_G.loc = new Vector2(216 + 48, 48);
            Gold_G.SetFont(Config.UI_FONT + "L", Global.Content, "Yellow", Config.UI_FONT);
            Gold_G.text = "G";
            // Text
            Message = new Message_Box(64, 8, 160, 2, false, "White");
            if (Post_Fight)
            {
                set_text(unit.is_dead ? Arena_Messages.Lose : (
                             Global.game_system.Arena_Retreat ? Arena_Messages.Yield : Arena_Messages.Win));
                Message.finished = true;
            }
            else
            {
                set_text(Arena_Messages.Intro);
            }

            Message_Active = true;
            // Choices

            set_images();
        }
コード例 #2
0
        private void change_phase(Class_Reel_Phases phase)
        {
            Timer  = 0;
            Action = 0;
            switch (phase)
            {
            case Class_Reel_Phases.Animation:
                White_Screen.opacity = 0;
                if (Battler == null)
                {
                    create_battler();
                }
                Burst      = null;
                Title_Back = null;
                Letters.Clear();
                Class_Banner.opacity = 0;
                Class_Banner.visible = false;
                break;

            case Class_Reel_Phases.Class_Name:
                Battler              = null;
                Battler_Action       = Class_Reel_Battler_Actions.Idle;
                Battler_Timer        = 0;
                Message              = null;
                Black_Screen.visible = true;
                Black_Bar1.visible   = false;
                Black_Bar2.visible   = false;
                Black_Bar_Timer      = -1;
                if (Phase == Class_Reel_Phases.Force_Close)
                {
                    increment_index();
                    Timer = 10;
                }
                break;

            case Class_Reel_Phases.Closing:
            case Class_Reel_Phases.Force_Close:
                Action = 0;
                break;
            }
            Phase = phase;
        }
コード例 #3
0
        protected override void initialize_images()
        {
            Item_Rect = new Rectangle(40, 88, 248, 16 * ROWS);

            // Black Screen
            Black_Screen           = new Sprite();
            Black_Screen.texture   = Global.Content.Load <Texture2D>(@"Graphics/White_Square");
            Black_Screen.dest_rect = new Rectangle(0, 0, Config.WINDOW_WIDTH, Config.WINDOW_HEIGHT);
            Black_Screen.tint      = new Color(0, 0, 0, 0);
            // Background
            Menu_Background background = new Menu_Background();

            background.texture = Global.Content.Load <Texture2D>(@"Graphics/Pictures/Status_Background");
            background.vel     = new Vector2(-0.25f, 0);
            background.tile    = new Vector2(3, 2);
            Background         = background;
            // Darkened Bar
            Darkened_Bar           = new Sprite();
            Darkened_Bar.texture   = Global.Content.Load <Texture2D>(@"Graphics/White_Square");
            Darkened_Bar.dest_rect = new Rectangle(0, 8, Config.WINDOW_WIDTH, 48);
            Darkened_Bar.tint      = new Color(0, 0, 0, 128);

            // Data
            refresh_buy();
            // Portrait BG
            Portrait_Bg = new Sprite();
            if (Global.game_system.preparations && string.IsNullOrEmpty(Shop.face))
            {
                Portrait_Bg.texture  = Global.Content.Load <Texture2D>(@"Graphics/Windowskins/Preparations_Screen");
                Portrait_Bg.src_rect = new Rectangle(136, 136, 48, 64);
                Portrait_Bg.loc      = new Vector2(16, 0);

                Portrait_Label     = new TextSprite();
                Portrait_Label.loc = Portrait_Bg.loc + new Vector2(8, 40);
                Portrait_Label.SetFont(Config.UI_FONT, Global.Content, "White");
                Portrait_Label.text = "Convoy";
            }
            else
            {
                Portrait_Bg.texture  = Global.Content.Load <Texture2D>(@"Graphics/Windowskins/Shop_Portrait_bg");
                Portrait_Bg.src_rect = new Rectangle(0, 0, 57, 57);
                Portrait_Bg.loc      = new Vector2(12, 4);
            }
            // Gold Window
            Gold_Window         = new Sprite();
            Gold_Window.texture = Global.Content.Load <Texture2D>(@"Graphics/Windowskins/Gold_Window");
            Gold_Window.loc     = new Vector2(212, 48);
            // Gold_Data
            Gold_Data     = new RightAdjustedText();
            Gold_Data.loc = new Vector2(216 + 48, 48);
            Gold_Data.SetFont(Config.UI_FONT, Global.Content, "Blue");
            redraw_gold();
            Gold_G     = new TextSprite();
            Gold_G.loc = new Vector2(216 + 48, 48);
            Gold_G.SetFont(Config.UI_FONT + "L", Global.Content, "Yellow", Config.UI_FONT);
            Gold_G.text = "G";
            // Text
            Message = new Message_Box(64, 8, 160, 2, false, "White");
            set_text(Shop_Messages.Intro);
            Message_Active = true;

            create_cancel_button();

            set_images();
        }
コード例 #4
0
        protected void set_stats()
        {
            // Description
            Message            = new Message_Box(88, 144, 224, 2, false, "White");
            Message.text_speed = Constants.Message_Speeds.Slow;
            Message.silence();
            Message.block_skip();
            Message.stereoscopic = Config.REEL_TEXT_BOX_DEPTH;
            // Name
            Name.text            = Unit.actor.class_name;
            Name.offset.X        = Name.text_width;
            Name.stereoscopic    = Config.REEL_CLASS_NAME_DEPTH;
            Name_Bg.text         = Name.text;
            Name_Bg.offset       = Name.offset;
            Name_Bg.stereoscopic = Config.REEL_CLASS_NAME_SHADOW_DEPTH;
            // Stat Bars
            for (int i = 0; i < Stat_Bars.Length; i++)
            {
                int j = i + (Class_Reel_Data.SKIP_LCK && i >= (int)Tactile.Stat_Labels.Lck ? 1 : 0);
                Stat_Bars[i].cap    = Unit.actor.get_cap(j);
                Stat_Bars[i].stat   = Stats[i];
                Stat_Values[i].text = Stats[i].ToString();
            }
            switch (Unit.actor.power_type())
            {
            case Power_Types.Strength:
                Stat_Labels[1].text = "Str";
                break;

            case Power_Types.Magic:
                Stat_Labels[1].text = "Mag";
                break;

            case Power_Types.Power:
                Stat_Labels[1].text = "Pow";
                break;
            }
            // Weapon types
            Weapon_Icons.Clear();
            List <int> weapon_types = Unit.actor.weapon_types();

            // Compacts Anima types into one icon
            for (int i = 0; i < weapon_types.Count; i++)
            {
                if (Data_Weapon.ANIMA_TYPES.Contains(weapon_types[i]))
                {
                    weapon_types[i] = Data_Weapon.ANIMA_TYPES.Min();
                }
                else if (weapon_types[i] > Data_Weapon.ANIMA_TYPES.Min())
                {
                    weapon_types[i] -= (Data_Weapon.ANIMA_TYPES.Length - 1);
                }
            }

            weapon_types = weapon_types.Distinct().ToList(); //ListOrEquals
            for (int i = 0; i < weapon_types.Count; i++)
            {
                Weapon_Icons.Add(new Icon_Sprite());
                Weapon_Icons[i].texture      = Global.Content.Load <Texture2D>(@"Graphics/Icons/Class Reel Weapons");
                Weapon_Icons[i].size         = new Vector2(32, 32);
                Weapon_Icons[i].columns      = 8;
                Weapon_Icons[i].loc          = new Vector2(8, 124) + new Vector2(32 * (i % 2), 32 * (i / 2));
                Weapon_Icons[i].index        = weapon_types[i] - 1;
                Weapon_Icons[i].stereoscopic = Config.REEL_WEAPON_ICONS_DEPTH;
            }
        }