예제 #1
0
    public void UpdateUI(HouseData houseToUpdate, bool isAsset = false)
    {
        //Debug.Log("UI CALLED");
        house = houseToUpdate;

        houseID    = house.GetID();
        houseName  = house.GetTitle();
        houseValue = house.GetValue();
        bidOwner   = house.GetLastPersonToBid();
        value.text = "$" + houseValue.ToString();
        title.text = houseName;

        titleAsset.text = houseName;
        valueAsset.text = "$" + houseValue.ToString();
        if (isAsset)
        {
            //TODO fix this
            UpdateHouseValueText();

            assetHouseType = true;
            assetSellButton.GetComponent <SVGImage>().sprite = assetHouseIcon;
            SwitchState(4);
            return;
        }
        if (house.GetLastPersonToBid() == 0)
        {
            bidIconButton.GetComponent <SVGImage>().sprite = noBidIcon;
            return;
        }
        if (house.GetLastPersonToBid() == PhotonNetwork.LocalPlayer.ActorNumber)
        {
            bidIconButton.GetComponent <SVGImage>().sprite = yourBidIcon;
            bidIconButton.GetComponent <SVGImage>().color  = yourColor;
            return;
        }
        if (bidIconButton.GetComponent <SVGImage>().sprite == yourBidIcon)
        {
            gameMasterRef.haveBidOnHouse = false;
        }
        goodHighlight.SetActive(false);
        bidIconButton.GetComponent <SVGImage>().sprite = bidIcon;
        bidIconButton.GetComponent <SVGImage>().color  = gameMasterRef.GetColorOfPlayer(gameMasterRef.GetOthersListPosition(house.GetLastPersonToBid()));
    }
예제 #2
0
    public void Click_GoToHouseViewer()
    {
        gameMasterRef.MenuBarSelection(7);

        if (gameMasterRef.prevMenuSelected == MenuOptions.YourAssets)
        {
            gameMasterRef.houseViewerManager.GetComponent <HouseViewerManager>().EstablishTheListToView(gameMasterRef.playerPhoton.GetAssetList(), houseID);
        }
        else
        {
            gameMasterRef.houseViewerManager.GetComponent <HouseViewerManager>().EstablishTheListToView(gameMasterRef.currentHouseBids, houseID);
        }

        gameMasterRef.theCard.GetComponent <HouseViewer>().UpdateCardUI(house.GetIncome(), house.GetTitle(), house.GetFamNum(), house.GetVictoryPoints(), house.GetExtraPurplePoints(), house.GetLocation());
    }