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);
|
||||
|
||||
Reference in new issue
Block a user