Exemplo n.º 1
0
        public void draw_armor_integrity_ratio(SpriteBatch sBatch, Armor target_armor, Color target_color, bool above)
        {
            string armor_max_c_integ = target_armor.get_max_c_integ().ToString();
            string armor_max_integ   = target_armor.get_max_integ().ToString();

            int line_spacing = big_text_font.LineSpacing;

            if (above)
            {
                line_spacing *= -1;
            }

            if (target_armor.what_armor_type() == Armor.Armor_Type.Helmet)
            {
                string  armor_head_report       = target_armor.get_helm_integ().ToString() + "/" + armor_max_integ;
                Vector2 armor_head_rep_position = new Vector2(head_center.X - big_text_font.MeasureString(armor_head_report).X / 2, head_center.Y);
                sBatch.DrawString(big_text_font, armor_head_report, armor_head_rep_position, target_color);
            }
            else
            {
                string  armor_chest_report       = target_armor.get_chest_integ().ToString() + "/" + armor_max_c_integ;
                Vector2 armor_chest_rep_position = new Vector2(torso_center.X - big_text_font.MeasureString(armor_chest_report).X / 2, torso_center.Y + line_spacing);
                sBatch.DrawString(big_text_font, armor_chest_report, armor_chest_rep_position, target_color);

                string  armor_larm_report       = target_armor.get_larm_integ().ToString() + "/" + armor_max_integ;
                Vector2 armor_larm_rep_position = new Vector2(larm_center.X - big_text_font.MeasureString(armor_larm_report).X / 2, larm_center.Y + line_spacing);
                sBatch.DrawString(big_text_font, armor_larm_report, armor_larm_rep_position, target_color);

                string  armor_rarm_report       = target_armor.get_rarm_integ().ToString() + "/" + armor_max_integ;
                Vector2 armor_rarm_rep_position = new Vector2(rarm_center.X - big_text_font.MeasureString(armor_rarm_report).X / 2, rarm_center.Y + line_spacing);
                sBatch.DrawString(big_text_font, armor_rarm_report, armor_rarm_rep_position, target_color);

                string  armor_lleg_report       = target_armor.get_lleg_integ().ToString() + "/" + armor_max_integ;
                Vector2 armor_lleg_rep_position = new Vector2(lleg_center.X - big_text_font.MeasureString(armor_lleg_report).X / 2, lleg_center.Y + line_spacing);
                sBatch.DrawString(big_text_font, armor_lleg_report, armor_lleg_rep_position, target_color);

                string  armor_rleg_report       = target_armor.get_rleg_integ().ToString() + "/" + armor_max_integ;
                Vector2 armor_rleg_rep_position = new Vector2(rleg_center.X - big_text_font.MeasureString(armor_rleg_report).X / 2, rleg_center.Y + line_spacing);
                sBatch.DrawString(big_text_font, armor_rleg_report, armor_rleg_rep_position, target_color);
            }
        }
Exemplo n.º 2
0
        public Armor(int IDno, int goldVal, string myName, Armor a)
            : base(IDno, goldVal, myName)
        {
            ablative_value   = a.get_armor_value(Armor.Armor_Value.Ablative);
            insulative_value = a.get_armor_value(Armor.Armor_Value.Insulative);
            padding_value    = a.get_armor_value(Armor.Armor_Value.Padding);
            hardness_value   = a.get_armor_value(Armor.Armor_Value.Hardness);
            rigidness_value  = a.get_armor_value(Armor.Armor_Value.Rigidness);

            max_integrity       = a.get_max_integ();
            max_chest_integrity = a.get_max_c_integ();
            c_chest_integ       = max_chest_integrity;
            c_rarm_integ        = max_integrity;
            c_larm_integ        = max_integrity;
            c_rleg_integ        = max_integrity;
            c_lleg_integ        = max_integrity;
            c_helm_integ        = max_integrity;

            my_armor_type      = a.what_armor_type();
            talismans_equipped = a.get_my_equipped_talismans();
        }