_TheStrongestSnail/TheStrongestSnail/Assets/Scripts/otherWoniu.cs

55 lines
1.5 KiB
C#
Raw Normal View History

2024-11-18 16:53:39 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class otherWoniu : MonoBehaviour
{
public List<GameObject> EndPosList;
2024-11-19 17:55:35 +08:00
public Transform WaitingArea;//<2F>ȴ<EFBFBD><C8B4><EFBFBD><EFBFBD><EFBFBD>
public List<BossContro> bossContros;
public Transform OrPosTrams;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
public Transform Panrent;//<2F><><EFBFBD>׽ڵ<D7BD>
2024-11-21 00:04:33 +08:00
public AllHouseContro allHouseContros;
2024-11-18 16:53:39 +08:00
// Start is called before the first frame update
void Start()
{
//OtherWoniuMove();
}
2024-11-21 00:04:33 +08:00
public void OtherWoniuMove(int roomNo)
2024-11-18 16:53:39 +08:00
{
2024-11-21 00:04:33 +08:00
foreach (HouseBtn house in allHouseContros.HouseBtnList)
{
if (house.roomNo==roomNo)
{
transform.GetComponent<PlayerMove>().EndPos=house.post.transform;
transform.GetComponent<PlayerMove>().StartMove();
}
}
2024-11-19 17:55:35 +08:00
}
public void BackWait()
{
// <20><>Ҫʱ<D2AA><CAB1> childObject <20>ƻ<EFBFBD>ԭʼ<D4AD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E5A3AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>һ<EFBFBD><D2BB><EFBFBD>ӽڵ<D3BD>
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));
2024-11-18 16:53:39 +08:00
}
}