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