diff --git a/TheStrongestSnail/Assets/Scenes/Battle_Royale.unity b/TheStrongestSnail/Assets/Scenes/Battle_Royale.unity index 55880d4..acc7652 100644 --- a/TheStrongestSnail/Assets/Scenes/Battle_Royale.unity +++ b/TheStrongestSnail/Assets/Scenes/Battle_Royale.unity @@ -1827,6 +1827,7 @@ MonoBehaviour: historyPanel: {fileID: 907368012} IsLoadIn: 0 IsHideLoadPanel: 0 + KillNos: is_jisha: 0 is_jisha_jiesuan: 0 --- !u!114 &142654724 @@ -8330,6 +8331,7 @@ MonoBehaviour: - {fileID: 74076849} - {fileID: 1725000187} - {fileID: 728954428} + ReTurnPos: {fileID: 0} --- !u!1 &718419355 GameObject: m_ObjectHideFlags: 0 @@ -12342,6 +12344,7 @@ MonoBehaviour: allHouseContro: {fileID: 142654723} bg: {fileID: 0} OrPos: {x: 0, y: 0} + allother: {fileID: 716344324} --- !u!114 &1088858451 MonoBehaviour: m_ObjectHideFlags: 0 @@ -15613,6 +15616,7 @@ MonoBehaviour: allHouseContro: {fileID: 142654723} bg: {fileID: 0} OrPos: {x: 0, y: 0} + allother: {fileID: 716344324} --- !u!114 &1377318869 MonoBehaviour: m_ObjectHideFlags: 0 @@ -17055,6 +17059,7 @@ MonoBehaviour: allHouseContro: {fileID: 142654723} bg: {fileID: 0} OrPos: {x: 0, y: 0} + allother: {fileID: 716344324} --- !u!114 &1519901233 MonoBehaviour: m_ObjectHideFlags: 0 @@ -17839,6 +17844,7 @@ MonoBehaviour: allHouseContro: {fileID: 142654723} bg: {fileID: 0} OrPos: {x: 0, y: 0} + allother: {fileID: 716344324} --- !u!114 &1557156372 MonoBehaviour: m_ObjectHideFlags: 0 @@ -20580,6 +20586,7 @@ MonoBehaviour: allHouseContro: {fileID: 142654723} bg: {fileID: 0} OrPos: {x: 0, y: 0} + allother: {fileID: 716344324} --- !u!114 &1790882392 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/TheStrongestSnail/Assets/Scripts/Battle_Royale/AllHouseContro.cs b/TheStrongestSnail/Assets/Scripts/Battle_Royale/AllHouseContro.cs index 45440cc..6982551 100644 --- a/TheStrongestSnail/Assets/Scripts/Battle_Royale/AllHouseContro.cs +++ b/TheStrongestSnail/Assets/Scripts/Battle_Royale/AllHouseContro.cs @@ -7,6 +7,7 @@ using UnityEditor; using UnityEngine; using UnityEngine.UI; using UnityEngine.Windows; +using System.Linq; using static BettingBtn; using static UnityEditor.Progress; @@ -40,6 +41,8 @@ public class AllHouseContro : MonoBehaviour public bool IsLoadIn;//是否已经进入游戏 public bool IsHideLoadPanel;//是否关闭加载页面 + + public List KillNos;//击杀房间列表 // Start is called before the first frame update async void Start() { @@ -302,6 +305,7 @@ public class AllHouseContro : MonoBehaviour ServerResponse514 serverResponse_514 = JsonConvert.DeserializeObject(response); string[] parts = serverResponse_514.data.roomNoKill.Split(","); // 根据 ',' 分割字符串d + KillNos = parts.Select(int.Parse).ToList(); int index_ = 0; foreach (string part in parts) { if (parts.Length > index_) diff --git a/TheStrongestSnail/Assets/Scripts/Battle_Royale/Allother.cs b/TheStrongestSnail/Assets/Scripts/Battle_Royale/Allother.cs index e2211e4..1369388 100644 --- a/TheStrongestSnail/Assets/Scripts/Battle_Royale/Allother.cs +++ b/TheStrongestSnail/Assets/Scripts/Battle_Royale/Allother.cs @@ -85,6 +85,23 @@ public class Allother : MonoBehaviour } + //对应房间蜗牛回起始点 + public void ReturnstartPos(int roomNo) + { + for (int i = 0; i < allHouseContro.HouseBtnList.Count; i++) + { + if (allHouseContro.HouseBtnList[i].roomNo == roomNo) + { + for (int j = 0; j < allHouseContro.HouseBtnList[i].otherWonius.Count; j++) + { + allHouseContro.HouseBtnList[i].otherWonius[j].GetComponent().EndPos = ReTurnPos; + } + allHouseContro.HouseBtnList[i].otherWonius.Clear(); + } + } + } + + public void CreateWoniu() { diff --git a/TheStrongestSnail/Assets/Scripts/Battle_Royale/BossContro.cs b/TheStrongestSnail/Assets/Scripts/Battle_Royale/BossContro.cs index 232d8b4..e6e627d 100644 --- a/TheStrongestSnail/Assets/Scripts/Battle_Royale/BossContro.cs +++ b/TheStrongestSnail/Assets/Scripts/Battle_Royale/BossContro.cs @@ -20,6 +20,8 @@ public class BossContro : MonoBehaviour public GameObject bg; public Vector2 OrPos; + + public Allother allother; // Start is called before the first frame update void Start() { diff --git a/TheStrongestSnail/Assets/Scripts/Battle_Royale/PlayerMove.cs b/TheStrongestSnail/Assets/Scripts/Battle_Royale/PlayerMove.cs index 12d5174..f521df7 100644 --- a/TheStrongestSnail/Assets/Scripts/Battle_Royale/PlayerMove.cs +++ b/TheStrongestSnail/Assets/Scripts/Battle_Royale/PlayerMove.cs @@ -366,7 +366,11 @@ public class PlayerMove : MonoBehaviour GetComponent().BossAni.SetInteger("State", 2); yield return new WaitForSeconds(3f); GetComponent().BossAni.SetInteger("State", 0); - + foreach (int nos in allHouseContro.KillNos) + { + GetComponent().allother.KilltheWoniu(nos); + } + allHouseContro.KillNos.Clear(); BettingBtn.instance.GiveMoney(room_id); yield return new WaitForSeconds(2f); //allHouseContro.BoosReturn();