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

View File

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

View File

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

View File

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