修复问题
This commit is contained in:
parent
fa51151185
commit
2b2d6d9414
File diff suppressed because it is too large
Load Diff
@ -3615,7 +3615,7 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0, y: 1}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0, y: 1}
|
||||||
m_AnchoredPosition: {x: 540, y: -1129.5}
|
m_AnchoredPosition: {x: 686, y: -1387.5}
|
||||||
m_SizeDelta: {x: 1018, y: 0}
|
m_SizeDelta: {x: 1018, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &1071890038
|
--- !u!114 &1071890038
|
||||||
|
@ -2,12 +2,12 @@ using Newtonsoft.Json;
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Unity.VisualScripting;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
using UnityEngine.Windows;
|
using UnityEngine.Windows;
|
||||||
using static UnityEditor.Progress;
|
|
||||||
using static UnityEngine.UIElements.UxmlAttributeDescription;
|
|
||||||
|
|
||||||
public class AllHouseContro : MonoBehaviour
|
public class AllHouseContro : MonoBehaviour
|
||||||
{
|
{
|
||||||
@ -27,6 +27,12 @@ public class AllHouseContro : MonoBehaviour
|
|||||||
|
|
||||||
public Allother allother;//控制其他蜗牛
|
public Allother allother;//控制其他蜗牛
|
||||||
public bool HaveallotherMove;
|
public bool HaveallotherMove;
|
||||||
|
|
||||||
|
public List<otherWoniu> otherWoniusList=new List<otherWoniu>();//其他蜗牛列表
|
||||||
|
public PlayerMove player;//玩家
|
||||||
|
|
||||||
|
public bool HaveLoad;
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
async void Start()
|
async void Start()
|
||||||
{
|
{
|
||||||
@ -79,6 +85,7 @@ public class AllHouseContro : MonoBehaviour
|
|||||||
is_jisha_jiesuan = false;
|
is_jisha_jiesuan = false;
|
||||||
is_jisha = false;
|
is_jisha = false;
|
||||||
|
|
||||||
|
StartCoroutine(LoadPanel.instance.ToHidePanel());
|
||||||
}
|
}
|
||||||
public bool is_jisha = false;
|
public bool is_jisha = false;
|
||||||
public bool is_jisha_jiesuan = false;
|
public bool is_jisha_jiesuan = false;
|
||||||
@ -98,12 +105,20 @@ public class AllHouseContro : MonoBehaviour
|
|||||||
HouseBtnList[index].text.GetComponentInChildren<TextBox>().SetText(item.roomBeansCoin);
|
HouseBtnList[index].text.GetComponentInChildren<TextBox>().SetText(item.roomBeansCoin);
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
Debug.Log("更新房间蜗牛蛋");
|
||||||
if(serverResponse.data.carrySeconds == -1)
|
if(serverResponse.data.carrySeconds == -1)
|
||||||
{
|
{
|
||||||
detailsText.GetComponentInChildren<Text>().text = "游戏结束了";
|
OtherBack();
|
||||||
|
|
||||||
|
player.ReturnStartPos();
|
||||||
|
|
||||||
|
detailsText.GetComponentInChildren<Text>().text = "";//游戏结束
|
||||||
battleRoyaleGameDetails();
|
battleRoyaleGameDetails();
|
||||||
|
LoadPanel.instance.ShowPanel();
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (serverResponse.data.carrySeconds < 45){
|
else if (serverResponse.data.carrySeconds < 45){
|
||||||
|
//ClearBoosHouseId();//清空boos房间号
|
||||||
ControAllDoorOpen();
|
ControAllDoorOpen();
|
||||||
text.GetComponentInChildren<Text>().text = (45 - serverResponse.data.carrySeconds).ToString();
|
text.GetComponentInChildren<Text>().text = (45 - serverResponse.data.carrySeconds).ToString();
|
||||||
detailsText.GetComponentInChildren<Text>().text = "秒后霸主出现";
|
detailsText.GetComponentInChildren<Text>().text = "秒后霸主出现";
|
||||||
@ -124,7 +139,7 @@ public class AllHouseContro : MonoBehaviour
|
|||||||
ControAllDoorClose();//关门
|
ControAllDoorClose();//关门
|
||||||
OpenBoosDoor(BoosHouse);//boos开门
|
OpenBoosDoor(BoosHouse);//boos开门
|
||||||
text.GetComponentInChildren<Text>().text = "";
|
text.GetComponentInChildren<Text>().text = "";
|
||||||
detailsText.GetComponentInChildren<Text>().text = "霸主出现了";
|
detailsText.GetComponentInChildren<Text>().text = "";//霸主出现
|
||||||
if (!is_jisha){
|
if (!is_jisha){
|
||||||
is_jisha = true;
|
is_jisha = true;
|
||||||
|
|
||||||
@ -160,12 +175,17 @@ public class AllHouseContro : MonoBehaviour
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//击杀刷新房间蛋
|
||||||
|
//checkOutAllTheEscapeRoomsAsync();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (serverResponse.data.carrySeconds > 50) {
|
else if (serverResponse.data.carrySeconds > 56) {
|
||||||
|
|
||||||
CloseBoosDoor(BoosHouse);
|
CloseBoosDoor(BoosHouse);
|
||||||
|
ClearBoosHouseId();////
|
||||||
text.GetComponentInChildren<Text>().text = "";
|
text.GetComponentInChildren<Text>().text = "";
|
||||||
detailsText.GetComponentInChildren<Text>().text = "结算";
|
detailsText.GetComponentInChildren<Text>().text = "";//结算
|
||||||
|
|
||||||
PlayerInfo.instance.AllBetCoins = 0;//投注归0
|
PlayerInfo.instance.AllBetCoins = 0;//投注归0
|
||||||
PlayerInfo.instance.SelfWoniuText.text= PlayerInfo.instance.AllBetCoins.ToString();
|
PlayerInfo.instance.SelfWoniuText.text= PlayerInfo.instance.AllBetCoins.ToString();
|
||||||
@ -187,10 +207,13 @@ public class AllHouseContro : MonoBehaviour
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
switch (serverResponse_515.data.outcome)
|
switch (serverResponse_515.data.outcome)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
Debug.Log("没有结果");
|
Debug.Log("没有结果");
|
||||||
|
|
||||||
|
BoosReturn();
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
SucceePanel.instance.ShowPanel();
|
SucceePanel.instance.ShowPanel();
|
||||||
@ -204,17 +227,40 @@ public class AllHouseContro : MonoBehaviour
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
settlementCoinUpdate.QueryPlayerInfo();
|
settlementCoinUpdate.QueryPlayerInfo();
|
||||||
|
|
||||||
Debug.Log("结算后更新左上角玩家蜗蛋数量:===============================================" + settlementCoinUpdate.Money);
|
Debug.Log("结算后更新左上角玩家蜗蛋数量:===============================================" + settlementCoinUpdate.Money);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void BoosReturn()
|
public void OtherBack()
|
||||||
|
{
|
||||||
|
foreach (otherWoniu item in otherWoniusList)
|
||||||
|
{
|
||||||
|
|
||||||
|
item.BackWait();
|
||||||
|
Debug.Log("other回去");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ClearBoosHouseId()
|
||||||
{
|
{
|
||||||
foreach (GameObject item in bossobj)//Boos回去
|
foreach (GameObject item in bossobj)//Boos回去
|
||||||
{
|
{
|
||||||
|
|
||||||
|
item.transform.GetComponent<BossContro>().HouseId = -1;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async void BoosReturn()
|
||||||
|
{
|
||||||
|
foreach (GameObject item in bossobj)//Boos回去
|
||||||
|
{
|
||||||
|
await Task.Delay(100);
|
||||||
item.GetComponent<BossContro>().ReturnParent();
|
item.GetComponent<BossContro>().ReturnParent();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ public class Allother : MonoBehaviour
|
|||||||
{
|
{
|
||||||
foreach (otherWoniu item in otherWonius)
|
foreach (otherWoniu item in otherWonius)
|
||||||
{
|
{
|
||||||
yield return new WaitForSeconds(1);
|
yield return new WaitForSeconds(0.5f);
|
||||||
item.OtherWoniuMove();
|
item.OtherWoniuMove();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
20
TheStrongestSnail/Assets/Scripts/Battle_Royale/BGM.cs
Normal file
20
TheStrongestSnail/Assets/Scripts/Battle_Royale/BGM.cs
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class BGM : MonoBehaviour
|
||||||
|
{
|
||||||
|
public AudioSource AudioSource;
|
||||||
|
// Start is called before the first frame update
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
AudioSource = GetComponent<AudioSource>();
|
||||||
|
AudioSource.Play();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
11
TheStrongestSnail/Assets/Scripts/Battle_Royale/BGM.cs.meta
Normal file
11
TheStrongestSnail/Assets/Scripts/Battle_Royale/BGM.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6c80bda1824cb3249a5870d0f42dbcd5
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -63,20 +63,23 @@ public class BettingBtn : MonoBehaviour
|
|||||||
body.bet = BetValue;
|
body.bet = BetValue;
|
||||||
body.roomNo = bg.GetComponentInChildren<AllHouseContro>().roomNo;
|
body.roomNo = bg.GetComponentInChildren<AllHouseContro>().roomNo;
|
||||||
body.userId = Global.global.serverResponse.data.userId;
|
body.userId = Global.global.serverResponse.data.userId;
|
||||||
|
|
||||||
bg.GetComponentInChildren<AllHouseContro>().house.text.GetComponent<TextBox>().AddText(BetValue);
|
bg.GetComponentInChildren<AllHouseContro>().house.text.GetComponent<TextBox>().AddText(BetValue);
|
||||||
PlayerInfo.instance.AllBetCoins += BetValue;
|
PlayerInfo.instance.AllBetCoins += BetValue;
|
||||||
StartCoroutine(Tools.AnimateTextMashPro(PlayerInfo.instance.AllBetCoins, PlayerInfo.instance.AllBetCoins + BetValue, 0.5f, SelfWoniuText));//修改蜗牛头上文本
|
StartCoroutine(Tools.AnimateTextMashPro(PlayerInfo.instance.AllBetCoins, PlayerInfo.instance.AllBetCoins + BetValue, 0.5f, SelfWoniuText));//修改蜗牛头上文本
|
||||||
string response = await web.SendRequest(web.URL + "/snail/gameEscape/userBet", "POST", JsonUtility.ToJson(body), Global.global.CreateHeaders());
|
string response = await web.SendRequest(web.URL + "/snail/gameEscape/userBet", "POST", JsonUtility.ToJson(body), Global.global.CreateHeaders());
|
||||||
Debug.Log("用户下注响应: " + response);
|
Debug.Log("用户下注响应: " + response);
|
||||||
bg.GetComponentInChildren<AllHouseContro>().battleRoyaleGameDetails();
|
bg.GetComponentInChildren<AllHouseContro>().battleRoyaleGameDetails();
|
||||||
|
bg.GetComponentInChildren<AllHouseContro>().checkOutAllTheEscapeRoomsAsync();//5.1.2
|
||||||
//调用玩家信息,更新左上角蜗蛋数量
|
//调用玩家信息,更新左上角蜗蛋数量
|
||||||
playerCoinUpdate.QueryPlayerInfo();
|
playerCoinUpdate.QueryPlayerInfo();
|
||||||
Debug.Log("点击了下注按钮================================================" + playerCoinUpdate.Money);
|
Debug.Log("点击了下注按钮================================================" + playerCoinUpdate.Money);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async void BetAgain()
|
public async void BetAgain()
|
||||||
{
|
{
|
||||||
|
bg.GetComponentInChildren<AllHouseContro>().battleRoyaleGameDetails();
|
||||||
RequestData body = new RequestData();
|
RequestData body = new RequestData();
|
||||||
body.escapeId = bg.GetComponentInChildren<AllHouseContro>().escapeId;
|
body.escapeId = bg.GetComponentInChildren<AllHouseContro>().escapeId;
|
||||||
body.bet = PlayerInfo.instance.AllBetCoins;
|
body.bet = PlayerInfo.instance.AllBetCoins;
|
||||||
@ -86,7 +89,8 @@ public class BettingBtn : MonoBehaviour
|
|||||||
|
|
||||||
string response = await web.SendRequest(web.URL + "/snail/gameEscape/userBet", "POST", JsonUtility.ToJson(body), Global.global.CreateHeaders());
|
string response = await web.SendRequest(web.URL + "/snail/gameEscape/userBet", "POST", JsonUtility.ToJson(body), Global.global.CreateHeaders());
|
||||||
Debug.Log("用户下注响应: " + response);
|
Debug.Log("用户下注响应: " + response);
|
||||||
bg.GetComponentInChildren<AllHouseContro>().battleRoyaleGameDetails();
|
|
||||||
|
bg.GetComponentInChildren<AllHouseContro>().checkOutAllTheEscapeRoomsAsync();//5.1.2
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetBet()
|
void SetBet()
|
||||||
@ -107,8 +111,8 @@ public class BettingBtn : MonoBehaviour
|
|||||||
|
|
||||||
public void GiveMoney(string room_id)
|
public void GiveMoney(string room_id)
|
||||||
{
|
{
|
||||||
float AllMoney = text1.GetComponent<TextBox>().ReturnText() + text2.GetComponent<TextBox>().ReturnText() + text3.GetComponent<TextBox>().ReturnText()
|
//float AllMoney = text1.GetComponent<TextBox>().ReturnText() + text2.GetComponent<TextBox>().ReturnText() + text3.GetComponent<TextBox>().ReturnText()
|
||||||
+ text4.GetComponent<TextBox>().ReturnText() + text5.GetComponent<TextBox>().ReturnText() + text6.GetComponent<TextBox>().ReturnText();
|
// + text4.GetComponent<TextBox>().ReturnText() + text5.GetComponent<TextBox>().ReturnText() + text6.GetComponent<TextBox>().ReturnText();
|
||||||
|
|
||||||
|
|
||||||
foreach (GameObject item in list)
|
foreach (GameObject item in list)
|
||||||
@ -118,7 +122,7 @@ public class BettingBtn : MonoBehaviour
|
|||||||
|
|
||||||
//item.GetComponent<TextBox>().ParentHouse.GetComponent<HouseBtn>().wn.GetComponent<wuniusj>().yingchang();
|
//item.GetComponent<TextBox>().ParentHouse.GetComponent<HouseBtn>().wn.GetComponent<wuniusj>().yingchang();
|
||||||
item.GetComponent<TextBox>().PlayAni();
|
item.GetComponent<TextBox>().PlayAni();
|
||||||
ControMoney(item);//·ÖÇ®
|
//ControMoney(item);//·ÖÇ®
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,13 +21,13 @@ public class FailPanel : BasePanel
|
|||||||
|
|
||||||
public void OnClickReBtn()
|
public void OnClickReBtn()
|
||||||
{
|
{
|
||||||
moveObject.GetComponent<PlayerMove>().ReturnStartPos();
|
//moveObject.GetComponent<PlayerMove>().ReturnStartPos();
|
||||||
HidePanel();
|
HidePanel();
|
||||||
}
|
}
|
||||||
public override void HidePanel()
|
public override void HidePanel()
|
||||||
{
|
{
|
||||||
base.HidePanel();
|
base.HidePanel();
|
||||||
woniuMovePos.IsReturn = true;
|
//woniuMovePos.IsReturn = true;
|
||||||
//BossContro.instance.ReturnParent();
|
//BossContro.instance.ReturnParent();
|
||||||
MaskContro.instance.SetMask(false);
|
MaskContro.instance.SetMask(false);
|
||||||
//都返回原来的位置
|
//都返回原来的位置
|
||||||
|
21
TheStrongestSnail/Assets/Scripts/Battle_Royale/LoadPanel.cs
Normal file
21
TheStrongestSnail/Assets/Scripts/Battle_Royale/LoadPanel.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class LoadPanel : BasePanel
|
||||||
|
{
|
||||||
|
public static LoadPanel instance;
|
||||||
|
|
||||||
|
public override void Start()
|
||||||
|
{
|
||||||
|
instance = this;
|
||||||
|
base.Start();
|
||||||
|
ShowPanel();
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEnumerator ToHidePanel()
|
||||||
|
{
|
||||||
|
yield return new WaitForSeconds(1.0f);
|
||||||
|
HidePanel();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5ffbfe812adcf3149ac162a9d6d8fe55
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -12,6 +12,7 @@ public class PlayerInfo : MonoBehaviour
|
|||||||
public float AllBetCoins;//总共下注蛋
|
public float AllBetCoins;//总共下注蛋
|
||||||
public TextMeshProUGUI SelfWoniuText;//蜗牛下注显示文本
|
public TextMeshProUGUI SelfWoniuText;//蜗牛下注显示文本
|
||||||
public bool HaveBet;//是否已经下注过
|
public bool HaveBet;//是否已经下注过
|
||||||
|
public Transform BetText;
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
@ -42,6 +43,7 @@ public class PlayerInfo : MonoBehaviour
|
|||||||
Money = userInfomation14.data.beansCoin;
|
Money = userInfomation14.data.beansCoin;
|
||||||
EggNum.instance.eggNumText.text = Money.ToString();
|
EggNum.instance.eggNumText.text = Money.ToString();
|
||||||
}
|
}
|
||||||
|
BetText.position = new Vector2(transform.position.x, transform.position.y + 100);
|
||||||
}
|
}
|
||||||
// 查询玩家信息
|
// 查询玩家信息
|
||||||
public async Task QueryPlayerInfo() // 5.1.1
|
public async Task QueryPlayerInfo() // 5.1.1
|
||||||
|
@ -187,8 +187,9 @@ public class PlayerMove : MonoBehaviour
|
|||||||
|
|
||||||
public void ReturnStartPos()//»Øµ½Æðʼµã
|
public void ReturnStartPos()//»Øµ½Æðʼµã
|
||||||
{
|
{
|
||||||
EndPos = ReturnPos;
|
transform.SetParent(transform.GetComponent<PlayerMovePos>().Parent);
|
||||||
StartMove();
|
transform.position=ReturnPos.position;
|
||||||
|
transform.GetComponent<PlayerMovePos>().StartPos = ReturnPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -232,7 +233,15 @@ public class PlayerMove : MonoBehaviour
|
|||||||
|
|
||||||
if (endIndex>startIndex)
|
if (endIndex>startIndex)
|
||||||
{
|
{
|
||||||
duration=(endIndex-startIndex)/Speed;
|
if (IsBoos)
|
||||||
|
{
|
||||||
|
duration = 2f;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
duration=(endIndex-startIndex)/Speed;
|
||||||
|
}
|
||||||
|
|
||||||
Vector3[] waypoints = new Vector3[endIndex-startIndex+1];
|
Vector3[] waypoints = new Vector3[endIndex-startIndex+1];
|
||||||
for (int i=startIndex,j=0;j< pathPoints.Length&&i<=endIndex; i++,j++)
|
for (int i=startIndex,j=0;j< pathPoints.Length&&i<=endIndex; i++,j++)
|
||||||
{
|
{
|
||||||
@ -249,7 +258,15 @@ public class PlayerMove : MonoBehaviour
|
|||||||
}
|
}
|
||||||
else if(endIndex < startIndex)
|
else if(endIndex < startIndex)
|
||||||
{
|
{
|
||||||
duration = (startIndex-endIndex) / Speed;
|
if (IsBoos)
|
||||||
|
{
|
||||||
|
duration = 3f;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
duration = (startIndex-endIndex) / Speed;
|
||||||
|
}
|
||||||
|
//duration = (startIndex-endIndex) / Speed;
|
||||||
Vector3[] waypoints = new Vector3[startIndex-endIndex + 1];
|
Vector3[] waypoints = new Vector3[startIndex-endIndex + 1];
|
||||||
for (int i = startIndex, j = 0; j < pathPoints.Length && i >= endIndex; i--, j++)
|
for (int i = startIndex, j = 0; j < pathPoints.Length && i >= endIndex; i--, j++)
|
||||||
{
|
{
|
||||||
@ -283,6 +300,8 @@ public class PlayerMove : MonoBehaviour
|
|||||||
objectToMove.DOMoveY(objectToMove.position.y + 100, 0.5f).OnComplete(() => {
|
objectToMove.DOMoveY(objectToMove.position.y + 100, 0.5f).OnComplete(() => {
|
||||||
JudgeEnd();
|
JudgeEnd();
|
||||||
SetParentToHouse();
|
SetParentToHouse();
|
||||||
|
|
||||||
|
|
||||||
objectToMove.GetComponent<PlayerMovePos>().StartPos = EndPos;
|
objectToMove.GetComponent<PlayerMovePos>().StartPos = EndPos;
|
||||||
|
|
||||||
|
|
||||||
@ -291,6 +310,10 @@ public class PlayerMove : MonoBehaviour
|
|||||||
{
|
{
|
||||||
MaskContro.instance.SetMask(false);
|
MaskContro.instance.SetMask(false);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
objectToMove.transform.position = new Vector2(transform.position.x + Random.Range(-50, 50), transform.position.y + Random.Range(-20, 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -5,6 +5,10 @@ using UnityEngine;
|
|||||||
public class otherWoniu : MonoBehaviour
|
public class otherWoniu : MonoBehaviour
|
||||||
{
|
{
|
||||||
public List<GameObject> EndPosList;
|
public List<GameObject> EndPosList;
|
||||||
|
public Transform WaitingArea;//等待区域
|
||||||
|
public List<BossContro> bossContros;
|
||||||
|
public Transform OrPosTrams;//出发点
|
||||||
|
public Transform Panrent;//父亲节点
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
@ -16,5 +20,26 @@ public class otherWoniu : MonoBehaviour
|
|||||||
int Index = Random.Range(0, EndPosList.Count);
|
int Index = Random.Range(0, EndPosList.Count);
|
||||||
transform.GetComponent<PlayerMove>().EndPos = EndPosList[Index].transform;
|
transform.GetComponent<PlayerMove>().EndPos = EndPosList[Index].transform;
|
||||||
transform.GetComponent<PlayerMove>().StartMove();
|
transform.GetComponent<PlayerMove>().StartMove();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void BackWait()
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 需要时将 childObject 移回原始父物体,并设置为第一个子节点
|
||||||
|
transform.SetParent(Panrent);
|
||||||
|
|
||||||
|
Vector3 RePos = Panrent.position;
|
||||||
|
RePos = new Vector2(RePos.x + Random.Range(-300, 300), RePos.y + Random.Range(-80, 80));
|
||||||
|
transform.position = RePos;
|
||||||
|
|
||||||
|
transform.GetComponent<PlayerMovePos>().StartPos = OrPosTrams;
|
||||||
|
|
||||||
|
//transform.position =new Vector2 (Random.Range(-50,50), Random.Range(-50, 50));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6f80ca54e77d80b40a24050b0a5527e5
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Binary file not shown.
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5362085b31f5bf94caf30e6fd01c5d80
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Binary file not shown.
@ -0,0 +1,21 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d5fe0dc9fe4d6d34381a47b3f2db6f6b
|
||||||
|
TrueTypeFontImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 4
|
||||||
|
fontSize: 16
|
||||||
|
forceTextureCase: -2
|
||||||
|
characterSpacing: 0
|
||||||
|
characterPadding: 1
|
||||||
|
includeFontData: 1
|
||||||
|
fontNames:
|
||||||
|
- Alibaba PuHuiTi 3.0
|
||||||
|
fallbackFontReferences: []
|
||||||
|
customCharacters:
|
||||||
|
fontRenderingMode: 0
|
||||||
|
ascentCalculationMode: 1
|
||||||
|
useLegacyBoundsCalculation: 0
|
||||||
|
shouldRoundAdvanceValue: 1
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Binary file not shown.
@ -0,0 +1,21 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 0a6cc27fb9863214e98331061dd7829c
|
||||||
|
TrueTypeFontImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 4
|
||||||
|
fontSize: 16
|
||||||
|
forceTextureCase: -2
|
||||||
|
characterSpacing: 0
|
||||||
|
characterPadding: 1
|
||||||
|
includeFontData: 1
|
||||||
|
fontNames:
|
||||||
|
- Alibaba PuHuiTi 3.0
|
||||||
|
fallbackFontReferences: []
|
||||||
|
customCharacters:
|
||||||
|
fontRenderingMode: 0
|
||||||
|
ascentCalculationMode: 1
|
||||||
|
useLegacyBoundsCalculation: 0
|
||||||
|
shouldRoundAdvanceValue: 1
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Binary file not shown.
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 02c4c9efbfe243541a7e71cac5a48944
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Binary file not shown.
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6dd5778b108e5104084a3b7ddbb6b1e4
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f3ba47879ee00f648a0362dadb9e9ada
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Binary file not shown.
After Width: | Height: | Size: 920 KiB |
@ -0,0 +1,135 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4bdc8a8659fe4614195888b5e31b40d1
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 12
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 0
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
ignoreMasterTextureLimit: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 1
|
||||||
|
wrapV: 1
|
||||||
|
wrapW: 0
|
||||||
|
nPOTScale: 0
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 1
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 1
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 8
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
cookieLightType: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Standalone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: WebGL
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Android
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID: 5e97eb03825dee720800000000000000
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
nameFileIdTable: {}
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Loading…
Reference in New Issue
Block a user