AR骑行和对战
This commit is contained in:
1 parent
341d386196
commit
3bcb3ee83e
51 files changed
+146686
-4950
No files matched your search
@@ -11,7 +11,7 @@ class GameRoomPlayerPanel : MonoBehaviour
|
||||
public Text ftpTxt;
|
||||
public RawImage head;
|
||||
|
||||
|
||||
public GameObject player;
|
||||
public GameObject owner;
|
||||
public GameObject playerModal;
|
||||
public GameObject notInUseModal;
|
||||
@@ -74,6 +74,20 @@ class GameRoomPlayerPanel : MonoBehaviour
|
||||
owner.SetActive(isOwner);
|
||||
IsOwner = isOwner;
|
||||
ready.SetActive(!isOwner && Status == 1);
|
||||
//生成3d人物
|
||||
if (sex == 1)
|
||||
{
|
||||
player = Instantiate(Resources.Load<GameObject>("UI/Prefab/GameRoom/GameRoomPlayer"));
|
||||
}
|
||||
else
|
||||
{
|
||||
player = Instantiate(Resources.Load<GameObject>("UI/Prefab/GameRoom/GameRoomPlayer_NV"));
|
||||
}
|
||||
player.layer = 9 + sort;
|
||||
foreach (Transform item in player.GetComponentInChildren<Transform>())
|
||||
{
|
||||
item.gameObject.layer = player.layer;
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdatePlayer(int userId, string userName, string headUrl, double weight, float ftp, bool isOwner, int Status,int sex)
|
||||
@@ -108,6 +122,7 @@ class GameRoomPlayerPanel : MonoBehaviour
|
||||
UserId = 0;
|
||||
notInUseModal.SetActive(false);
|
||||
inviteModal.SetActive(true);
|
||||
player?.Destroy();
|
||||
}
|
||||
public void NotInUse()
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ using System;
|
||||
|
||||
public class GameRoomResult : MonoBehaviour
|
||||
{
|
||||
VideoGameManager manager;
|
||||
CyclingController manager;
|
||||
RawImage Head;
|
||||
Text Ranking;
|
||||
Text Timer;
|
||||
@@ -38,7 +38,7 @@ public class GameRoomResult : MonoBehaviour
|
||||
Text CloseTitle { get; set; }
|
||||
private void Awake()
|
||||
{
|
||||
manager = FindObjectOfType<VideoGameManager>();
|
||||
manager = FindObjectOfType<CyclingController>();
|
||||
var closeBtn = transform.Find("Close").gameObject;
|
||||
Head = transform.Find("Mine/Head").GetComponent<RawImage>();
|
||||
Ranking = transform.Find("Mine/Ranking").GetComponent<Text>();
|
||||
@@ -119,7 +119,7 @@ public class GameRoomResult : MonoBehaviour
|
||||
CloseTime.gameObject.SetActive(true);
|
||||
}
|
||||
//当前用户排名
|
||||
var currentRanking = list.Where(c => c.UserId == manager.CurrentPlayer.UserId).FirstOrDefault();
|
||||
var currentRanking = list.Where(c => c.UserId == manager.currentPlayer.UserId).FirstOrDefault();
|
||||
if (currentRanking != null)
|
||||
{
|
||||
Utils.DisplayImage(Head, currentRanking.WxHeadImg, true);
|
||||
|
||||
@@ -272,7 +272,15 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
|
||||
App.MainSceneParam["Name"] = "MapListPanel";
|
||||
}
|
||||
}
|
||||
SceneManager.LoadScene("Ride");
|
||||
//判断是否启用了AR骑行
|
||||
if (map.EnableAR)
|
||||
{
|
||||
SceneManager.LoadScene("VideoPlay");
|
||||
}
|
||||
else
|
||||
{
|
||||
SceneManager.LoadScene("Ride");
|
||||
}
|
||||
//foreach (var item in Utils.propTextureCache)
|
||||
//{
|
||||
// DestroyImmediate(item.Value);
|
||||
|
||||
@@ -31,6 +31,11 @@ public class GameRoomCountDownController : PFUIPanel
|
||||
endCount.gameObject.SetActive(isEnd);
|
||||
}
|
||||
|
||||
public override void Close()
|
||||
{
|
||||
base.Close();
|
||||
}
|
||||
|
||||
float timer = 0f;
|
||||
private void Update()
|
||||
{
|
||||
|
||||
@@ -865,7 +865,7 @@ public class GameRoomListController : PFUIPanel
|
||||
private async void GetList()
|
||||
{
|
||||
if (isEnd) return;
|
||||
var res = await ConfigHelper.mapApi.GetList(pageIndex, pageSize, ftname, distance, string.Join(",", hands), is3d, sort, sortDire, isEnableAR:isEnableAR);
|
||||
var res = await ConfigHelper.mapApi.GetList(pageIndex, pageSize, ftname, distance, string.Join(",", hands), is3d, sort, sortDire, isEnableAR:false);//isEnableAR TODO:临时禁用AR地图
|
||||
if (res.result)
|
||||
{
|
||||
if (res.data.Count == 0)
|
||||
|
||||
@@ -107,7 +107,7 @@ public class GameRoomLoadingController : PFUIPanel
|
||||
}
|
||||
//判断是否进入骑行场景
|
||||
var startTime = GameRoom.StartTime;
|
||||
var singleUi = FindObjectOfType<SingleUIManager>();
|
||||
var singleUi = FindObjectOfType<GameRoomUIManager>();
|
||||
if (startTime.HasValue)
|
||||
{
|
||||
var dateTime = UIManager.Now.GetDateTime();
|
||||
|
||||
Reference in new issue
Block a user