public void run_comparison(Player pl) { if (comparatorPopup == null) { if (im_shopping_for == Shopping_Mode.Armor) { Armor p_armor = null; Armor c_armor = (Armor)current_list[selected_item_index]; if (c_armor.what_armor_type() == Armor.Armor_Type.Helmet) { p_armor = pl.show_helmet(); } else if (c_armor.what_armor_type() == Armor.Armor_Type.OverArmor) { p_armor = pl.show_over_armor(); } else { p_armor = pl.show_under_armor(); } comparatorPopup = new ComparisonPopup(blank_texture, sFont, smaller_Font, cManager, p_armor, c_armor); } else { comparatorPopup = new ComparisonPopup(blank_texture, sFont, smaller_Font, cManager, pl.show_main_hand(), (Weapon)current_list[selected_item_index], pl.show_off_hand()); } } }
public ShopScreen(List <string> mItems, SpriteFont sf, SpriteFont small_f, Rectangle cl, ref ContentManager cm, Texture2D blnkTex) { menuItems = new List <string>(mItems); shopManager = new ShopXManager(cm); current_item_info = new List <string>(); cManager = cm; sFont = sf; smaller_Font = small_f; client = cl; selectedIndex = 0; im_shopping_for = Shopping_Mode.Main; rGen = new Random(); //Choose a random blurb, based on what character you picked. blurb_position = new Vector2(20f, 20f); comparatorPopup = null; blank_texture = blnkTex; }
public void clear_comparison() { comparatorPopup = null; }