public async void Load_new_data(Building building) { gameObject.SetActive(true); this.building = building; Data_player_building data_player_building = building.B_data_player_building; Data_building data_building = await SQL_Manager.Select <Data_building>("Building", data_player_building.Id_building); G_Name.text = data_building.Name; G_time.text = "Time: " + building.time.ToString() + " Sec"; G_item1.Refresh(building.Id_i1); }
public override GameObject Get_new_objectSQL(object dataA, object dataB) { GameObject new_item = Resources.Load <GameObject>("GUI/Item"); GameObject temp = Instantiate(new_item); Gui_item item = temp.GetComponent <Gui_item>(); Data_item_stack Is = (Data_item_stack)dataA; Data_item I = (Data_item)dataB; item.data_item_stack = Is; item.data_item = I; item.Start(); item.Refresh(Is.Id_item); return(temp); }