fix:1、更换项目,使用winter来创建

This commit is contained in:
2026-04-22 11:13:16 +08:00
parent 173cfb2dc9
commit 83ff9f71ad
7375 changed files with 209752 additions and 157557 deletions
@@ -2,7 +2,7 @@ using System.Collections;
using System.Collections.Generic;
namespace FlowerPower
namespace LoveLegend
{
public class RecordViewCtrl : BaseCtrl
{
@@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace FlowerPower
namespace LoveLegend
{
public class RecordViewModel : BaseModel
{
@@ -3,13 +3,14 @@ using System.Collections.Generic;
using UnityEngine;
using FutureCore;
using FairyGUI;
using FGUI.P01_Common;
using FGUI.ZM_Common_01;
using System;
using DG.Tweening;
using FGUI.bkg_jilu;
using SGModule.Common.Extensions;
using Unity.VisualScripting;
namespace FlowerPower
namespace LoveLegend
{
public class RecordViewUI : BaseUI
{
@@ -93,7 +94,7 @@ namespace FlowerPower
// 初始化页面逻辑
private void InitView()
{
for (int i = 0; i < 10; i++)
for (int i = 0; i < 9; i++)
{
GObject item = ui.panel.GetChild("item" + i);
list_panel.Add(item);
@@ -116,23 +117,41 @@ namespace FlowerPower
}
}
if (ctrl.model.recordList.Count >= 10 && !isroll) // 注意这里应该是 10,因为 list_panel 只有 10 个元素
if (ctrl.model.recordList.Count >= 9 && !isroll) // 注意这里应该是 9,因为 list_panel 只有 9 个元素
{
isroll = true;
coroutine = CrazyAsyKit.StartCoroutine(ScrollRoutine());
}
}
private (string key, int value) GetVipLevelFromName(string name)
{
switch (name)
{
case "Gold":
return ("G.VIP", 1);
case "Platinum":
return ("P.VIP", 2);
case "Diamond":
return ("D.VIP", 3);
default:
return (string.Empty, 0);
}
}
private void setRecord(int index, GObject obj)
{
com_record_item item = (com_record_item)obj;
string[] values = ctrl.model.recordList[index].Split('-');
string[] values = ctrl.model.recordList[index].Split('#');
item.name.text = values[0];
item.num.text = GameHelper.getChString(decimal.Parse(values[1])); // 假设 money 是显示金额的字段
var (key, value) = GetVipLevelFromName(values[1]);
item.num.text = key; // 假设 money 是显示金额的字段
string[] parts = values[2].Split(" ");
item.time.text = parts[0];
item.lab_claim.text = GameHelper.getDesByKey("ww");
item.icon_loader.url = $"ui://LG_Common/vip_{value}";
}
private IEnumerator ScrollRoutine()
@@ -140,11 +159,11 @@ namespace FlowerPower
while (true)
{
int panelCount = list_panel.Count; // 缓存 list_panel 的长度
for (int i = 0; i < panelCount; i++)
{
for (int i = 0; i < panelCount; i++)
{
if (i < list_panel.Count) // 再次检查索引是否有效
{
float targetY = list_panel[i].y - 126;
float targetY = list_panel[i].y - 129;
GObjectMoveFunc.MoveTween(list_panel[i], targetY);
}
}
@@ -176,7 +195,7 @@ namespace FlowerPower
if (targetY <= -16)
{
// 第一个 item 放到最后一个位置
obj.y = 1146;
obj.y = 1048;
}
});
}
@@ -3,7 +3,7 @@ using System.Collections.Generic;
using UnityEngine;
namespace FlowerPower
namespace LoveLegend
{
public class RecordViewUICtrl : BaseUICtrl
@@ -82,7 +82,7 @@ namespace FlowerPower
// Debug.Log($" barry refresh args == {args}");
// Debug.Log($" barry refresh list == {model.recordList.Count}");
if (model.recordList.Count >= 10)
if (model.recordList.Count >= 9)
{
model.recordList.RemoveAt(0);