终端只重建内容区并合并同帧刷新;平台费页文案;按住签名随 Gas 档位缩短
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
876a8c4daa
commit
f5beeea900
14 files changed
+138
-28
No files matched your search
@@ -97,6 +97,13 @@ namespace Decentralized
|
||||
return L.T("hw.wallet.n", w.Name ?? (i + 1).ToString());
|
||||
}
|
||||
|
||||
/// <summary>按住 ✓ 签名要多久:基础秒数 × 该钱包当前 Gas 档位的速度倍数(快档短、慢档长)。</summary>
|
||||
internal static float HoldSecs(string address)
|
||||
{
|
||||
var w = Session.Data?.Own(address);
|
||||
return (float)(Tuning.TxHoldSecs * (w == null ? 1 : TxRules.TierSpeed(Dev(w).Tier)));
|
||||
}
|
||||
|
||||
private static Device Dev(Wallet w)
|
||||
{
|
||||
if (!Devices.TryGetValue(w.Address, out var dev)) Devices[w.Address] = dev = new Device { Address = w.Address };
|
||||
@@ -614,16 +621,17 @@ namespace Decentralized
|
||||
}
|
||||
|
||||
private void Update() { Log.Guard("钱包动画", WalletWindow.Tick); Log.Guard("出金动画", Funds.Tick); }
|
||||
private void LateUpdate() => Log.Guard("终端刷新", TerminalWindow.Flush);
|
||||
}
|
||||
|
||||
/// <summary>✓ 键上的按住计时:按满 1.2 秒签名,鼠标挪开或松手就重来。进度用游戏自带的按住圆环显示。</summary>
|
||||
public sealed class HoldToSign : MonoBehaviour, IPointerDownHandler, IPointerUpHandler, IPointerExitHandler
|
||||
{
|
||||
private const float Seconds = 1.2f;
|
||||
private float Seconds = (float)Tuning.TxHoldSecs;
|
||||
private float held = -1f;
|
||||
public string Device;
|
||||
|
||||
public void OnPointerDown(PointerEventData e) => held = 0f;
|
||||
public void OnPointerDown(PointerEventData e) { Seconds = WalletWindow.HoldSecs(Device); held = 0f; }
|
||||
public void OnPointerUp(PointerEventData e) => Stop();
|
||||
public void OnPointerExit(PointerEventData e) => Stop();
|
||||
|
||||
|
||||
Reference in new issue
Block a user