阶段性完成

This commit is contained in:
SoulliesOfficial
2026-07-25 13:27:53 -04:00
parent de70870682
commit a34461d31f
121 changed files with 7022 additions and 4111 deletions

View File

@@ -2,7 +2,6 @@ using System;
using System.Collections;
using System.Collections.Generic;
using DG.Tweening;
using I2.Loc;
using TMPro;
using UnityEngine;
using UnityEngine.Events;
@@ -27,13 +26,13 @@ namespace Ichni.UI
public string suffix;
public bool showPositiveMark;
public void SetUp(int initialValue, int step, string title = "")
public void SetUp(int initialValue, int step)
{
intStep = step;
intMin = int.MinValue;
intMax = int.MaxValue;
base.SetUp(title);
base.SetUp();
increaseButton.SetUpButton(IncreaseValue, IncreaseValue);
decreaseButton.SetUpButton(DecreaseValue, DecreaseValue);
@@ -94,7 +93,7 @@ namespace Ichni.UI
{
valueText.text = prefix + (showPositiveMark && intValue > 0 ? "+" : "") + intValue.ToString() + suffix;
var target = new Vector2((float)(intValue - intMin) / (intMax - intMin) * 660, 20);
var target = new Vector2((float)(intValue - intMin) / (intMax - intMin) * 560, 20);
barImage.rectTransform.sizeDelta = target;
updateValueAction?.Invoke();
}
@@ -106,7 +105,7 @@ namespace Ichni.UI
if (LastValue == intValue) return;
tween?.Complete();
valueText.text = prefix + (showPositiveMark && intValue > 0 ? "+" : "") + intValue.ToString() + suffix;
var target = new Vector2((float)(intValue - intMin) / (intMax - intMin) * 660, 20);
var target = new Vector2((float)(intValue - intMin) / (intMax - intMin) * 560, 20);
tween = barImage.rectTransform.DOSizeDelta(target, 0.2f).SetEase(Ease.OutExpo).Play();
LastValue = intValue;
updateValueAction?.Invoke();
@@ -117,4 +116,4 @@ namespace Ichni.UI
return intValue;
}
}
}
}