public void UpdateHouseValueText() { int valOfHomeOnMarket = gameMasterRef.GetValueForHome(house.GetFamNum()); if (valOfHomeOnMarket > houseValue) { int dif = valOfHomeOnMarket - houseValue; houseIncreaseValue.color = new Color(0, 1, 0.1185064f); houseIncreaseValue.text = "+$" + dif; } else { int dif = houseValue - valOfHomeOnMarket; houseIncreaseValue.color = new Color(1.0f, 0.3f, 0.3f, 1.0f); houseIncreaseValue.text = "-$" + dif; } }
private HouseData SetupHouseValue(HouseData theHouse) { if (gameMasterRef.currentHouseBids == null) { theHouse.SetValue(gameMasterRef.GetValueForHome(theHouse.GetFamNum())); return(theHouse); } for (int i = 0; i < gameMasterRef.currentHouseBids.Count; i++) { if (gameMasterRef.currentHouseBids[i].GetID() == theHouse.GetID()) { return(gameMasterRef.currentHouseBids[i]); } } theHouse.SetValue(gameMasterRef.GetValueForHome(theHouse.GetFamNum())); return(theHouse); }