Esempio n. 1
0
 private void OnActiveLineChanged(GameDataProperty property)
 {
     activeTextBlocks[activeTextBlocks.Count - 1] = property.GetValue <TextBlock>();
     if (ActiveTextContainer == null)
     {
         return;
     }
     ActiveTextContainer.SetContent(activeTextBlocks);
 }
Esempio n. 2
0
    protected override void OnPropertyUpdated(GameDataProperty prop)
    {
        lastPercentage           = Mathf.Clamp01(prop.GetValue <float>());
        PercentageBar.localScale = Vector3.Lerp(MinimumScale, MaximumScale, lastPercentage);
        int intPercentage = (int)(lastPercentage * 100);

        PercentageText.text = $"{intPercentage}%";
        UpdateUsageTexts();
    }
    private void OnJobProgressUpdated(GameDataProperty prop)
    {
        float percentage = Mathf.Clamp01(prop.GetValue <float>());

        ProgressBar.localScale = Vector3.Lerp(MinimumScale, MaximumScale, percentage);
        int intPercentage = (int)(percentage * 100);

        ProgressPercentageText.text = $"{intPercentage}%";
    }
Esempio n. 4
0
 private void OnTabsVisibleChanged(GameDataProperty property)
 {
     if (property.GetValue <bool>())
     {
         TabsContainer.gameObject.SetActive(true);
     }
     else
     {
         TabsContainer.gameObject.SetActive(false);
         SetTabActive(0);
     }
 }
Esempio n. 5
0
 private void OnMultiplierChanged(GameDataProperty prop)
 {
     lastMultiplier = prop.GetValue <int>();
     UpdateUsageTexts();
 }
Esempio n. 6
0
 private void OnCapacityChanged(GameDataProperty prop)
 {
     lastCapacity = prop.GetValue <float>();
     UpdateUsageTexts();
 }