public void refresh(DeviceInfoList list) { foreach (DeviceItem device in list_) { DestroyImmediate(device.gameObject); } list_.Clear(); foreach (DeviceInfo info in list) { DeviceItem item = GameObject.Instantiate(_phototype); item.setup(info); item.transform.SetParent(this.transform); item.transform.position = _phototype.transform.position; item.transform.localScale = _phototype.transform.localScale; item.gameObject.SetActive(true); list_.Add(item); } //throw new NotImplementedException(); }
public void selected(DeviceItem item) { fsm_.post("select", item.id); }
public int getIndex(DeviceItem item) { return(list_.FindIndex(a => a.id == item.id)); }
public void onSelected(DeviceItem item) { this.selected(item); }