protected override void setProperty(XElement element) { foreach (XElement item in element.Element("_ship").Elements()) { Mem_shipBase mem_shipBase = new Mem_shipBase(); mem_shipBase.setProperty(item); Ship.Add(mem_shipBase); } foreach (XElement item2 in element.Element("_slotitem").Elements()) { Slotitem.Add(Model_Base.SetUserData <Mem_slotitem>(item2)); } foreach (XElement item3 in element.Element("_furniture").Elements()) { Furniture.Add(Model_Base.SetUserData <Mem_furniture>(item3)); } foreach (XElement item4 in element.Element("_ship_book").Elements()) { Ship_book.Add(Model_Base.SetUserData <Mem_book>(item4)); } foreach (XElement item5 in element.Element("_slot_book").Elements()) { Slot_book.Add(Model_Base.SetUserData <Mem_book>(item5)); } foreach (var item6 in element.Element("_clear").Elements().Select((XElement obj, int idx) => new { obj, idx })) { _clear[item6.idx] = int.Parse(item6.obj.Value); } FleetLevel = int.Parse(element.Element("_fleetLevel").Value); FleetExp = uint.Parse(element.Element("_fleetExp").Value); }
private void OnTriggerEnter2D(Collider2D collision) { if (Furniture == null) { return; } var f = collision.gameObject.GetComponent <Furniture>(); if (f && !Furniture.Contains(f)) { Furniture.Add(f); f.Zone = this; } OnUpdateLayout(); }
public ActionResult Add(Furniture u) { u.Add(); return(View()); }