void CreateItemButton() { if (GUILayout.Button("Create " + stritemtype)) { temparmor = new ISArmor(); show_details = true; CreateNewArmor = true; } }
public void Clone(ISArmor armor) { base.Clone(armor); _maxArmor = armor._maxArmor; _currentArmor = armor._currentArmor; _durability = armor.Durability; _maxdurability = armor.MaxDurability; EquipmentSlot = armor.EquipmentSlot; _prefab = armor.Prefab; }
public void ListView(Vector2 BSize) { Scroll = GUILayout.BeginScrollView(Scroll, "Box", GUILayout.ExpandHeight(true), GUILayout.Width(_listviewwidth)); for (int cnt = 0; cnt < db.Count; cnt++) { if (GUILayout.Button(db.Get(cnt).Name, GUILayout.Width(BSize.x), GUILayout.Height(BSize.y))) { _selectedindex = cnt; temparmor = new ISArmor(db.Get(cnt)); // tempweapon = new ISWeapon(); // tempweapon.Clone(db.Get(cnt)); temparmor = db.Get(cnt); show_details = true; CreateNewArmor = true; // state = DisplayState.DETAILS; } } GUILayout.EndScrollView(); }
public ISArmor(ISArmor armor) { Clone(armor); }