Beispiel #1
0
 public void SetCategory(int categoryIndex)
 {
     for (int i = 0; i < categoryButtonUnits.Length; ++i)
     {
         // 모델에서 카테고리 정보를 가져와서 켜고 끈다.
         categoryButtonUnits[i].SafeSetActive(true);
         string categoryName = StringValue.GetString((InventoryCategory)i);
         categoryButtonUnits[i].SetCategory(i, categoryName, onEventChangeCategory);
         categoryButtonUnits[i].SetCategoryName();
         categoryButtonUnits[i].CategoryOnOff(i == categoryIndex);
     }
 }
Beispiel #2
0
    private void SetStatusUI(StatusType statusType)
    {
        string name     = StringValue.GetString(statusType);
        int    value    = status.GetStatus(statusType);
        int    addValue = addStatus.GetStatus(statusType);

        if (addValue > 0)
        {
            statusUnits[(int)statusType].Show(name, string.Format("<color=#00FF00>{0}</color>", (value + addValue)));
        }
        else
        {
            statusUnits[(int)statusType].Show(name, value.ToString());
        }
    }