Ejemplo n.º 1
0
 private void OnActiveLineChanged(GameDataProperty property)
 {
     activeTextBlocks[activeTextBlocks.Count - 1] = property.GetValue <TextBlock>();
     if (ActiveTextContainer == null)
     {
         return;
     }
     ActiveTextContainer.SetContent(activeTextBlocks);
 }
Ejemplo 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();
    }
Ejemplo n.º 3
0
    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}%";
    }
Ejemplo n.º 4
0
 private void OnTabsVisibleChanged(GameDataProperty property)
 {
     if (property.GetValue <bool>())
     {
         TabsContainer.gameObject.SetActive(true);
     }
     else
     {
         TabsContainer.gameObject.SetActive(false);
         SetTabActive(0);
     }
 }
Ejemplo n.º 5
0
 private void OnMultiplierChanged(GameDataProperty prop)
 {
     lastMultiplier = prop.GetValue <int>();
     UpdateUsageTexts();
 }
Ejemplo n.º 6
0
 private void OnCapacityChanged(GameDataProperty prop)
 {
     lastCapacity = prop.GetValue <float>();
     UpdateUsageTexts();
 }