public void setRentable(RentableHome rentableHome, Transform NewmenuTransform) { rentable = rentableHome; setInfo(); startGameButton.setRentable(rentable); menuTransform = NewmenuTransform; onUiOpen?.Invoke(rentable.PrefabForDisplay); }
private void Start() { menuTransform = this.transform.parent; GameObject prefab = Resources.Load <GameObject>(HomeUIELementPrefab); foreach (RentableHomeScriptable rentable in allScriptableHomes) { GameObject newRentableButton = Instantiate(prefab); RentableHome rentableHome = new RentableHome(rentable); newRentableButton.transform.SetParent(containerForHomeUIElementPrefabs); newRentableButton.GetComponent <RentableButton>().setRentable(rentableHome, menuTransform); } }
public void setRentable(RentableHome InforentableHome) { rentableHome = InforentableHome; }
public void setRentable(RentableHome rentable, Transform menu) { rentableHome = rentable; menuTransform = menu; setText(); }