备份CatanBuilding瘦身独立工程

This commit is contained in:
JSD\13999
2026-05-26 16:15:54 +08:00
commit 2d0e6a61b7
12001 changed files with 2431925 additions and 0 deletions

View File

@@ -0,0 +1,90 @@
using asap.core;
using cfg;
using GameCore;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class ChestRewardItem : PanelItemBase<ChestRewardItemData>
{
GameObject bar_root;
Image bar;
GameObject bg_normal;
GameObject bg_gray;
GameObject bg_next;
RewardItemNew[] rewardItems;
TMP_Text text_grade;
Image icon_chest;
TMP_Text text_point;
private void Awake()
{
bar_root = transform.Find("bg_bar").gameObject;
bar = transform.Find("bg_bar/bar").GetComponent<Image>();
bg_normal = transform.Find("bg_normal").gameObject;
bg_gray = transform.Find("bg_gray").gameObject;
bg_next = transform.Find("bg_next").gameObject;
rewardItems = transform.Find("reward").GetComponentsInChildren<RewardItemNew>();
icon_chest = transform.Find("icon_chest").GetComponent<Image>();
text_grade = transform.Find("bg_grade/text_grade").GetComponent<TMP_Text>();
text_point = transform.Find("text_point").GetComponent<TMP_Text>();
}
public void SetData(Account account)
{
text_grade.text = account.ID.ToString();
var itemDatas = GContext.container.Resolve<PlayerItemData>().GetItemDataByDropId(account.Rewards);
int len = 0;
if (itemDatas != null)
{
len = itemDatas.Count;
for (int i = 0; i < itemDatas.Count; i++)
{
if (i >= rewardItems.Length)
{
break;
}
rewardItems[i].SetData(itemDatas[i]);
}
}
for (int i = len; i < rewardItems.Length; i++)
{
rewardItems[i].gameObject.SetActive(false);
}
bg_next.SetActive(data.next);
//此处 等级相关转为工会积分相关
if (GContext.container.Resolve<PlayerData>().lv >= account.ID)
{
bar.fillAmount = 1;
bg_gray.SetActive(true);
bg_normal.SetActive(false);
}
else
{
bar.fillAmount = 0;
bg_gray.SetActive(false);
bg_normal.SetActive(!data.next);
}
for (int i = 0; i < rewardItems.Length; i++)
{
rewardItems[i].SetReceived(GContext.container.Resolve<PlayerData>().lv >= account.ID);
}
if (data.nextIndex - 1 == index)
{
bar.fillAmount = data.fillAmount;
}
bar_root.SetActive(data.bar);
}
public override void OnInit()
{
SetData(data.account);
}
}
public class ChestRewardItemData
{
public Account account;
public int nextIndex;
public float fillAmount;
public bool next;
public bool bar = true;
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2e84dc6c0bd00124bb54200aa26d20dd
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,20 @@
using GameCore;
using UnityEngine;
using UnityEngine.UI;
public class ChestSettlementChes : MonoBehaviour
{
Button btn_continue;
private void Awake()
{
btn_continue = transform.Find("btn_continue/btn_green").GetComponent<Button>();
}
private void Start()
{
btn_continue.onClick.AddListener(() =>
{
UIManager.Instance.DestroyUI(UITypes.ClubChestSettlementPanel);
});
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 58d7bc528c335424a9d889051982e442
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,20 @@
using GameCore;
using UnityEngine;
using UnityEngine.UI;
public class ChestSettlementChestNone : MonoBehaviour
{
Button btn_continue;
private void Awake()
{
btn_continue = transform.Find("btn_continue/btn_green").GetComponent<Button>();
}
private void Start()
{
btn_continue.onClick.AddListener(() =>
{
UIManager.Instance.DestroyUI(UITypes.ClubChestSettlementPanel);
});
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6026464c8f10ee5459339018e09ace14
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,20 @@
using GameCore;
using UnityEngine;
using UnityEngine.UI;
public class ChestSettlementPlayer : MonoBehaviour
{
Button btn_continue;
private void Awake()
{
btn_continue = transform.Find("btn_continue/btn_green").GetComponent<Button>();
}
private void Start()
{
btn_continue.onClick.AddListener(() =>
{
UIManager.Instance.DestroyUI(UITypes.ClubChestSettlementPanel);
});
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 65871b9d2ebfd0f42b0049210ef34a9f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,20 @@
using GameCore;
using UnityEngine;
using UnityEngine.UI;
public class ChestSettlementRank : MonoBehaviour
{
Button btn_continue;
private void Awake()
{
btn_continue = transform.Find("btn_continue/btn_green").GetComponent<Button>();
}
private void Start()
{
btn_continue.onClick.AddListener(() =>
{
UIManager.Instance.DestroyUI(UITypes.ClubChestSettlementPanel);
});
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 487f124fe0324be4e942829079778407
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,19 @@
using GameCore;
using UnityEngine;
using UnityEngine.UI;
public class ClubBannerTarget : MonoBehaviour
{
Button btn_questionmark;
private void Awake()
{
btn_questionmark = transform.Find("btn_questionmark").GetComponent<Button>();
}
private void Start()
{
btn_questionmark.onClick.AddListener(() =>
{
UIManager.Instance.ShowUI(UITypes.ClubChestSettlementPanel);
});
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2fcc2ac1d2ab8584bac1635ee128312c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,70 @@
using asap.core;
using cfg;
using GameCore;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ClubChestPopupPanel : MonoBehaviour
{
Button btn_close;
PanelScroll scrollRect;
Image bar;
GameObject gradeItem;
List<ChestRewardItemData> gradeDatas = new List<ChestRewardItemData>();
float itemHigh = 250;
private void Awake()
{
btn_close = transform.Find("btn_close").GetComponent<Button>();
bar = transform.Find("root/root_reward/ScrollView/Viewport/Content/bg_bar/bar").GetComponent<Image>();
scrollRect = transform.Find("root/root_reward/ScrollView").GetComponent<PanelScroll>();
gradeItem = transform.Find("root/root_reward/ScrollView/Viewport/Content/item").gameObject;
gradeItem.SetActive(false);
itemHigh = gradeItem.GetComponent<RectTransform>().sizeDelta.y;
scrollRect.isReversal = true;
}
private void Start()
{
//btn_close.onClick.AddListener(() =>
//{
// UIManager.Instance.DestroyUI(UITypes.ClubChestPopupPanel);
//});
//gradeDatas.Clear();
////等级相关转为工会积分Todo
//var account = GContext.container.Resolve<Tables>().TbAccount.DataList;
//int nextIndex = account.Count - 1;
//for (int i = 0; i < account.Count; i++)
//{
// if (GContext.container.Resolve<PlayerData>().lv < account[i].ID)
// {
// nextIndex = i;
// break;
// }
//}
//bar.fillAmount = GContext.container.Resolve<PlayerData>().lv / (float)account[0].ID;
//int showCount = nextIndex + 10;
//if (showCount > account.Count)
//{
// showCount = account.Count;
//}
//for (int i = 0; i < showCount; i++)
//{
// gradeDatas.Add(new ChestRewardItemData() { account = account[i], nextIndex = nextIndex });
//}
//if (nextIndex > 0)
//{
// int startLv = account[nextIndex - 1].ID;
// var nextAccountData = account[nextIndex];
// gradeDatas[nextIndex - 1].fillAmount = (GContext.container.Resolve<PlayerData>().lv - startLv) / (float)(nextAccountData.ID - startLv);
// gradeDatas[nextIndex].next = true;
// nextIndex--;
//}
//else if (GContext.container.Resolve<PlayerData>().lv < account[0].ID)
//{
// gradeDatas[0].next = true;
//}
//gradeDatas[^1].bar = false;
//scrollRect.Init<ChestRewardItem, ChestRewardItemData>(itemHigh, gradeItem, null, gradeDatas, _currentIndex: nextIndex, _minShowAdd: 3);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1fbcd429e0eb4314f8e44a02a76d0cff
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,19 @@
using GameCore;
using UnityEngine;
using UnityEngine.UI;
public class ClubChestSettlementPanel : MonoBehaviour
{
Button btn_mask;
private void Awake()
{
btn_mask = transform.Find("btn_mask").GetComponent<Button>();
}
private void Start()
{
btn_mask.onClick.AddListener(() =>
{
UIManager.Instance.DestroyUI(UITypes.ClubChestSettlementPanel);
});
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e4385f74e941fae48ad1287319ef8932
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,19 @@
using GameCore;
using UnityEngine;
using UnityEngine.UI;
public class ClubRankPopupPanel : MonoBehaviour
{
Button btn_close;
private void Awake()
{
btn_close = transform.Find("btn_close").GetComponent<Button>();
}
private void Start()
{
btn_close.onClick.AddListener(() =>
{
UIManager.Instance.DestroyUI(UITypes.ClubRankPopupPanel);
});
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0148056dba84eaa43bac4a051590aadb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: