예제 #1
0
    public void setExperienceLevel(int exp, int lev)
    {
        int totalExp = lev * 100;

        experience.text = UnitGUI.getSmallCapsString("Experience: " + exp + "/" + totalExp, 10);
        level.text      = UnitGUI.getSmallCapsString("Level: " + lev, 10) + (exp >= totalExp ? "<color=green>" + UnitGUI.getSmallCapsString("(Level Up!)", 10) + "</color>" : "");
    }
예제 #2
0
 public void setValues(int c, int exp, bool won)
 {
     winText.SetActive(won);
     loseText.SetActive(!won);
     rewardText.gameObject.SetActive(won);
     baseButton.SetActive(won);
     loadGameButton.SetActive(!won);
     quitToMenuButton.SetActive(!won);
     rewardText.text = "<color=#c3c331>+" + c + UnitGUI.getSmallCapsString("c", 14) + "</color>\n+" + exp + UnitGUI.getSmallCapsString("exp", 14);
 }
예제 #3
0
    string getNPCStatusSummary(Unit npcUnit)
    {
        string name        = npcUnit.getName();
        float  chanceToHit = 0.0f;

        if (map.getCurrentUnit() != null)
        {
            chanceToHit = 5 * (20 + map.getCurrentUnit().getMeleeScoreWithMods(npcUnit) - npcUnit.getAC());
        }
        chanceToHit = (chanceToHit > 100) ? 100 : chanceToHit;
        string healthCondition  = getHealthCondition(npcUnit);
        string npcStatusSummary = string.Format(" {0}\n {1}\nHit Chance:  {2}%", name, healthCondition, chanceToHit);

        npcStatusSummary = UnitGUI.getSmallCapsString(npcStatusSummary, Mathf.FloorToInt(toolTipText.fontSize * 0.67f));
        return(npcStatusSummary);
    }
예제 #4
0
    public void setUp(BlackMarketItem item, BaseManager bm, bool selling)
    {
        this.selling     = selling;
        this.bm          = bm;
        this.item        = item;
        itemText.text    = UnitGUI.getSmallCapsString(item.item.getBlackMarketText(), 12);
        priceText.text   = (selling ? item.item.getBlackMarketSellPriceText() :item.item.getBlackMarketPriceText());
        itemImage.sprite = item.item.inventoryTexture;
        if (selling)
        {
            buyButton.transform.GetChild(0).GetComponent <Text>().text = "Sell";
        }
        Vector2 size = item.item.getSize() * 32.0f;

        if (size.x > 90 || size.y > 90)
        {
            size /= 2.0f;
        }
        itemImage.GetComponent <RectTransform>().sizeDelta = size;
        setCanAfford();
    }
예제 #5
0
 string getPlayerStatusSummary(Unit playerUnit)
 {
     return(UnitGUI.getSmallCapsString(playerUnit.getStatusSummary(), Mathf.FloorToInt(toolTipText.fontSize * 0.67f)));
 }
예제 #6
0
 public void setName(string n)
 {
     name.text = UnitGUI.getSmallCapsString(n, 10);
 }