This commit is contained in:
GL 2024-12-19 19:02:25 +08:00
commit 731a8b10bb
13 changed files with 543 additions and 858 deletions

File diff suppressed because it is too large Load Diff

View File

@ -48,7 +48,7 @@ TextureImporter:
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 18, y: 0, z: 16, w: 0}
spriteBorder: {x: 18, y: 8, z: 16, w: 9}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1

View File

@ -30,6 +30,9 @@ public class WaterPanel : MonoBehaviour
public Text petLevelshow;
public Image petExpFill;
public Button feedBtn;
public GameObject Pet;
// Start is called before the first frame update
async void Start()
{
@ -69,10 +72,20 @@ public class WaterPanel : MonoBehaviour
public void Updated_petinfo(petBettleInfoResponse info)
{
petLevel.text = "³èÎïµÈ¼¶Lv." + info.data.Info.level;
petLevelshow.text = info.data.Info.exp + "/" + info.data.Info.upgrade_exp;
petExpFill.fillAmount = info.data.Info.exp / info.data.Info.upgrade_exp;
if (info.data.Info == null)
{
Pet.gameObject.SetActive(false);
feedBtn.gameObject.SetActive(false);
}
else
{
Pet.gameObject.SetActive(true);
feedBtn.gameObject.SetActive(true);
petLevel.text = "³èÎïµÈ¼¶Lv." + info.data.Info.level;
petLevelshow.text = info.data.Info.exp + "/" + info.data.Info.upgrade_exp;
petExpFill.fillAmount = info.data.Info.exp / info.data.Info.upgrade_exp;
}
}

View File

@ -128,12 +128,6 @@ public class BaoshiRoomcontroller : MonoBehaviour
return;
}
//if (fishMan == null)
//{
// Promptmgr.Instance.PromptBubble("还没有买精灵!", Color.black, Color.red);
// return;
//}
if (await ActivationRoom())
{
add_fish();

View File

@ -87,6 +87,11 @@ public class AssetsPanel : MonoBehaviour
isUpdating = false;
}
private void OnEnable()
{
InvokeRepeating("UpDateText", 1f, 1f);
}
private void OnDisable()
{
CancelInvoke("UpDateText");

View File

@ -5,6 +5,11 @@ using UnityEngine.UI;
public class Tree_team : MonoBehaviour
{
public Text DirectPushNum;
public Text PushNum;
public Image DirectPushFill;
public Image PushFill;
public Text TeammateCount;
public Text TeamName;
@ -19,6 +24,12 @@ public class Tree_team : MonoBehaviour
TeamName.text = info.Data.Info.Nickname;
TeamId.text = info.Data.Info.Uid;
TeamCount.text = "团队人数:"+info.Data.Info.TeamCount;
DirectPushNum.text = info.Data.Items[0].NowVal+"/" + info.Data.Items[0].ReqVal;
DirectPushFill.fillAmount = info.Data.Items[0].Percentage;
PushNum.text = info.Data.Items[0].NowVal + "/" + info.Data.Items[0].ReqVal;
PushFill.fillAmount = info.Data.Items[0].Percentage;
Init();
}

View File

@ -25,13 +25,22 @@ public class Scene_baoshidao : MonoBehaviour
int index = 0;
foreach (MinngConfigData info in infos)
{
lands[index].GetComponent<baoshidao_contorl>().RoomId = info.Id;
lands[index].GetComponent<baoshidao_contorl>().daoyuName.text = info.Name;
baoshidao_contorl go = lands[index].GetComponent<baoshidao_contorl>();
go.RoomId = info.Id;
go.daoyuName.text = info.Name;
go.ActivateValue = info.Price;
go.goldNumerTextPro.text = info.Price.ToString("f0");
if (info.ActivateCount > 0)
{
for (int temp = info.ActivateCount; temp > 0; temp--)
{
go.OnClick();
}
}
lands[index].GetComponent<baoshidao_contorl>().ActivateValue = info.Price;
lands[index].GetComponent<baoshidao_contorl>().goldNumerTextPro.text = info.Price.ToString("f0");
index++;
}
}

View File

@ -26,7 +26,20 @@ public class Scene_baoshikuang : MonoBehaviour
int index = 0;
foreach (MinngConfigData info in infos)
{
lands[index].GetComponent<BaoshiRoomcontroller>().RoomId = info.Id;
BaoshiRoomcontroller roomController = lands[index].GetComponent<BaoshiRoomcontroller>();
// 更新 RoomId
roomController.RoomId = info.Id;
// 如果 ActivateCount 大于 0则调用 OnClick 方法
if (info.ActivateCount > 0)
{
for (int temp = 0; temp < info.ActivateCount; temp++) // 使用更常见的循环方式
{
roomController.OnClick();
}
}
index++;
}
}

View File

@ -25,14 +25,17 @@ public class Scene_jinbikuang : MonoBehaviour
int index = 0;
foreach (MinngConfigData info in infos)
{
lands[index].GetComponent<roomcontroller>().RoomId = info.Id;
//lands[index].GetComponent<roomcontroller>().RoomName.text = info.Name;
lands[index].GetComponent<roomcontroller>().ActivateValue = info.Price;
//lands[index].GetComponent<roomcontroller>().goldNumerTextPro.text = info.Price.ToString("f0");
// lands[index].GetComponent<roomcontroller>().shipNumberTextPro.text =
// info.ActivateCount.ToString() + "/" + info.ActivateLimit;
roomcontroller go = lands[index].GetComponent<roomcontroller>();
go.RoomId = info.Id;
go.ActivateValue = info.Price;
if (info.ActivateCount > 0)
{
for (int temp = info.ActivateCount; temp > 0; temp--)
{
go.OnClick();
}
}
index++;
}

View File

@ -25,15 +25,23 @@ public class scene_jingshadao : MonoBehaviour
int index = 0;
foreach (MinngConfigData info in infos)
{
lands[index].GetComponent<jishadao_contorl>().RoomId = info.Id;
lands[index].GetComponent<jishadao_contorl>().daoyuName.text = info.Name;
jishadao_contorl go = lands[index].GetComponent<jishadao_contorl>();
go.RoomId = info.Id;
go.daoyuName.text = info.Name;
lands[index].GetComponent<jishadao_contorl>().ActivateValue = info.Price;
lands[index].GetComponent<jishadao_contorl>().goldNumerTextPro.text = info.Price.ToString("f0");
lands[index].GetComponent<jishadao_contorl>().shipNumberTextPro.text =
info.ActivateCount.ToString() + "/" + info.ActivateLimit;
go.ActivateValue = info.Price;
go.goldNumerTextPro.text = info.Price.ToString("f0");
go.shipNumberTextPro.text =info.ActivateCount.ToString() + "/" + info.ActivateLimit;
if (info.ActivateCount > 0)
{
for (int temp = info.ActivateCount; temp > 0; temp--)
{
go.OnClick();
}
}
index++;
}
}

View File

@ -83,7 +83,7 @@ public class Logo_in : mount
bool issucceffull = await loading_Jiekou.RealNameAuthentications(boxTypes[1].content, boxTypes[2].content);
if (issucceffull)
{
gameObject.SetActive(false);
gameObject.GetComponent<input_box_pop_up_window>().destroy();
Promptmgr.Instance.PromptBubble("登录成功");
sceneslider.gameObject.SetActive(true);
StartCoroutine(jiaLoading());
@ -194,15 +194,7 @@ public class Logo_in : mount
GameObject gameObject = add_pop_up(true);//生成弹窗母体
List<GameObject> gameObjects = gameObject.GetComponent<input_box_pop_up_window>().updateUI(boxTypes, "登录");//测试输入框回调处理
//gameObjects[0].GetComponent<input_box_pop_up_window_item>().register_click((BoxType boxType, int type) =>//手机号获取验证码点击
//{
// if (boxType.is_required && string.IsNullOrWhiteSpace(boxType.content))
// {
// Promptmgr.Instance.PromptBubble("请不要" + boxType.textName + "为空");
// return;
// }
// Debug.Log("获取验证码");
//});
gameObjects[1].GetComponent<input_box_pop_up_window_item>().register_click(async (BoxType boxType, int type) =>//登录确定或取消
{
if (type == 0)
@ -251,6 +243,7 @@ public class Logo_in : mount
if (info.Data.certify_status == -1)
{
Real_name_screen();
gameObject.GetComponent<input_box_pop_up_window>().destroy();
}
else
{

View File

@ -22,6 +22,7 @@ public class loading_jiekou : MonoBehaviour
/// <returns></returns>
public async Task<bool> RealNameAuthentications(string name, string identity_card_no)
{
_realNameAuthentication = new realNameAuthentication();
RealNameBody body = new RealNameBody();
body.name = name;
body.identity_card_no = identity_card_no;

View File

@ -78,5 +78,5 @@ public class TreeTeamItem
public string Desc { get; set; }
public int NowVal { get; set; }
public int ReqVal { get; set; }
public string Percentage { get; set; }//百分比进度 1 = 100%
public float Percentage { get; set; }//百分比进度 1 = 100%
}