This commit is contained in:
wulongxiao 2024-12-20 12:03:29 +08:00
parent abe132a692
commit ef0587c815
4 changed files with 36 additions and 28 deletions

View File

@ -57,8 +57,7 @@ public class jskPanel : mount
{
lands[0].GetComponent<roomcontroller>().add_fish();
PlayerManager.Instance.SetMoney(MoneyType.Coins, -200);
}
}
@ -70,9 +69,7 @@ public class jskPanel : mount
if (!Generate1 && (PlayerManager.Instance.Coins - 400) > 0)
{
lands[1].GetComponent<roomcontroller>().add_fish();
PlayerManager.Instance.SetMoney(MoneyType.Coins, -400);
lands[1].GetComponent<roomcontroller>().BuyActivation();
}
}
@ -83,9 +80,8 @@ public class jskPanel : mount
{
if (!Generate1 && (PlayerManager.Instance.Coins - 600) > 0)
{
lands[2].GetComponent<roomcontroller>().add_fish();
PlayerManager.Instance.SetMoney(MoneyType.Coins, -600);
lands[2].GetComponent<roomcontroller>().BuyActivation();
}
}
@ -96,9 +92,7 @@ public class jskPanel : mount
{
if (!Generate1 && (PlayerManager.Instance.Coins - 600) > 0)
{
lands[3].GetComponent<roomcontroller>().add_fish();
PlayerManager.Instance.SetMoney(MoneyType.Coins, -600);
lands[3].GetComponent<roomcontroller>().BuyActivation();
}
}
@ -109,9 +103,7 @@ public class jskPanel : mount
{
if (!Generate1 && (PlayerManager.Instance.Coins - 600) > 0)
{
lands[4].GetComponent<roomcontroller>().add_fish();
PlayerManager.Instance.SetMoney(MoneyType.Coins, -600);
lands[4].GetComponent<roomcontroller>().BuyActivation();
}
}

View File

@ -141,12 +141,24 @@ public class roomcontroller : MonoBehaviour
}
}
/// <summary>
/// 购买激活
/// </summary>
public async void BuyActivation()
{
if (await ActivationRoom())
{
Promptmgr.Instance.PromptBubble("激活成功");
//Promptmgr.Instance.PromptBubble("激活成功");
add_fish();
}
}
public async void add_fish(string timerStr = null)//生成船只
{
if (timerStr != null)

View File

@ -54,9 +54,9 @@ public class jishadao_buy :mount
if (!Generate1 && (PlayerManager.Instance.Coins - 200) > 0)
{
lands[0].GetComponent<jishadao_contorl>().add_fish();
PlayerManager.Instance.SetMoney(MoneyType.Coins, -200);
lands[0].GetComponent<jishadao_contorl>().BuyActivation();
}
}
@ -68,9 +68,9 @@ public class jishadao_buy :mount
if (!Generate1 && (PlayerManager.Instance.Coins - 400) > 0)
{
lands[1].GetComponent<jishadao_contorl>().add_fish();
PlayerManager.Instance.SetMoney(MoneyType.Coins, -400);
lands[1].GetComponent<jishadao_contorl>().BuyActivation();
}
}
@ -81,8 +81,7 @@ public class jishadao_buy :mount
{
if (!Generate1 && (PlayerManager.Instance.Coins - 600) > 0)
{
lands[2].GetComponent<jishadao_contorl>().add_fish();
PlayerManager.Instance.SetMoney(MoneyType.Coins, -600);
lands[2].GetComponent<jishadao_contorl>().BuyActivation();
}
}

View File

@ -158,17 +158,22 @@ public class jishadao_contorl : MonoBehaviour
}
/// <summary>
/// ¹ºÂò¼¤»î
/// </summary>
public async void BuyActivation()
{
if (await ActivationRoom())
{
ScaleAni(OnBtnAni);
add_fish();
}
}
public async void add_fish(string timerStr = null)//生成船只
{
if (fishMan != null)