示例#1
0
    void UpdateRoomsInfo()
    {
        roomUpgradesGroup.transform.GetChild(0).GetChild(0).GetComponent <Text>().text = PlayerRooms.GetBedRoomTier().ToString();
        roomUpgradesGroup.transform.GetChild(0).GetChild(1).GetComponent <Text>().text = PlayerRooms.GetNextBedRoomUpgradeCostsAsString();

        roomUpgradesGroup.transform.GetChild(1).GetChild(0).GetComponent <Text>().text = PlayerRooms.GetKitchenRoomTier().ToString();
        roomUpgradesGroup.transform.GetChild(1).GetChild(1).GetComponent <Text>().text = PlayerRooms.GetNextKitchenUpgradeCostsAsString();

        roomUpgradesGroup.transform.GetChild(2).GetChild(0).GetComponent <Text>().text = PlayerRooms.GetOfficeRoomTier().ToString();
        roomUpgradesGroup.transform.GetChild(2).GetChild(1).GetComponent <Text>().text = PlayerRooms.GetNextOfficeUpgradeCostsAsString();

        roomUpgradesGroup.transform.GetChild(3).GetChild(0).GetComponent <Text>().text = PlayerRooms.GetStudyRoomTier().ToString();
        roomUpgradesGroup.transform.GetChild(3).GetChild(1).GetComponent <Text>().text = PlayerRooms.GetNextStudyUpgradeCostsAsString();

        roomUpgradesGroup.transform.GetChild(4).GetChild(0).GetComponent <Text>().text = PlayerRooms.GetWorkshopRoomTier().ToString();
        roomUpgradesGroup.transform.GetChild(4).GetChild(1).GetComponent <Text>().text = PlayerRooms.GetNextWorkshopUpgradeCostsAsString();

        updateRooms = false;
    }