Compare commits
2 Commits
38bbe2ff4e
...
5dcc934ab2
Author | SHA1 | Date | |
---|---|---|---|
5dcc934ab2 | |||
dbd2515609 |
@ -31,7 +31,7 @@ public class Drill : MonoBehaviour
|
|||||||
noRoomText.gameObject.SetActive(false); // 初始隐藏文本
|
noRoomText.gameObject.SetActive(false); // 初始隐藏文本
|
||||||
|
|
||||||
content = transform.Find("Mid/Scroll View/Viewport/Content");
|
content = transform.Find("Mid/Scroll View/Viewport/Content");
|
||||||
if(GlobalData.ServerData.data.isCreater=="N")
|
if(GlobalData.ServerData.data.isCreater=="Y")
|
||||||
{
|
{
|
||||||
username.text = $"[{GlobalData.ServerData.data.userId}](管理员)";
|
username.text = $"[{GlobalData.ServerData.data.userId}](管理员)";
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ using System;
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityEngine.Analytics;
|
||||||
using UnityEngine.SceneManagement;
|
using UnityEngine.SceneManagement;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
@ -15,6 +16,7 @@ public class ReadRoom : MonoBehaviour
|
|||||||
public bool isenter=false;//主持人进入
|
public bool isenter=false;//主持人进入
|
||||||
public bool isadministrator = false;//是否是管理员
|
public bool isadministrator = false;//是否是管理员
|
||||||
private bool isStartRoom = false;//主持人是否已经点击演练开始
|
private bool isStartRoom = false;//主持人是否已经点击演练开始
|
||||||
|
public bool iszongzhihui = false;
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
@ -44,8 +46,33 @@ public class ReadRoom : MonoBehaviour
|
|||||||
{
|
{
|
||||||
Debug.LogError(1);
|
Debug.LogError(1);
|
||||||
SceneManager.LoadScene("yhj");
|
SceneManager.LoadScene("yhj");
|
||||||
isadministrator=true;
|
isadministrator=false;
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
isadministrator = true; ;
|
||||||
}
|
}
|
||||||
|
foreach(var item in response.Data)
|
||||||
|
{
|
||||||
|
foreach(var item1 in item.PlayerList)
|
||||||
|
{
|
||||||
|
if(GlobalData.ServerData.data.userId==item1.UserId)
|
||||||
|
{
|
||||||
|
if(item1.RoleId==8000)//Ö÷³ÖÈË
|
||||||
|
{
|
||||||
|
isenter=true;
|
||||||
|
}
|
||||||
|
else if(item1.RoleId == 8001)//×ÜÖ¸»Ó
|
||||||
|
{
|
||||||
|
iszongzhihui=true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
isenter = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
roomDataList = response.Data;
|
roomDataList = response.Data;
|
||||||
Debug.Log($"获取到的房间数量:{roomDataList.Count}");
|
Debug.Log($"获取到的房间数量:{roomDataList.Count}");
|
||||||
// 获取当前日期
|
// 获取当前日期
|
||||||
@ -71,6 +98,7 @@ public class ReadRoom : MonoBehaviour
|
|||||||
//Player.CSZS.SetPlayerID(room.PlayerList[i].RoleId);
|
//Player.CSZS.SetPlayerID(room.PlayerList[i].RoleId);
|
||||||
Debug.Log("可以直接进入房间");
|
Debug.Log("可以直接进入房间");
|
||||||
SceneManager.LoadScene("Tmap 1");
|
SceneManager.LoadScene("Tmap 1");
|
||||||
|
//if(GlobalData.ServerData.data.openId==)
|
||||||
isenter = true;
|
isenter = true;
|
||||||
found = true; // 找到匹配用户 ID
|
found = true; // 找到匹配用户 ID
|
||||||
break; // 直接跳出循环
|
break; // 直接跳出循环
|
||||||
@ -80,14 +108,14 @@ public class ReadRoom : MonoBehaviour
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("主持人点击了开始演练,但没有进入场景,要进入大厅房间");
|
Debug.Log("主持人点击了开始演练,但没有进入场景,要进入大厅房间");
|
||||||
SceneManager.LoadScene("yhj");
|
//SceneManager.LoadScene("yhj");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// 如果没有找到匹配的用户 ID,跳转到 "yhj" 场景
|
// 如果没有找到匹配的用户 ID,跳转到 "yhj" 场景
|
||||||
if (!found)
|
if (!found)
|
||||||
{
|
{
|
||||||
Debug.Log("未找到匹配用户 ID,跳转到场景 'yhj'");
|
Debug.Log("未找到匹配用户 ID,跳转到场景 'yhj'");
|
||||||
SceneManager.LoadScene("yhj");
|
//SceneManager.LoadScene("yhj");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// 如果找到了匹配房间,不需要再检查其他房间
|
// 如果找到了匹配房间,不需要再检查其他房间
|
||||||
@ -96,7 +124,7 @@ public class ReadRoom : MonoBehaviour
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("状态不是 '进行中',跳转到场景 'yhj'");
|
Debug.Log("状态不是 '进行中',跳转到场景 'yhj'");
|
||||||
SceneManager.LoadScene("yhj");
|
//SceneManager.LoadScene("yhj");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,8 @@ using UnityEngine.UI;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using UnityEngine.SceneManagement;
|
using UnityEngine.SceneManagement;
|
||||||
using Unity.VisualScripting;
|
using Unity.VisualScripting;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
public class Starthost : MonoBehaviour
|
public class Starthost : MonoBehaviour
|
||||||
{
|
{
|
||||||
// 定义委托事件
|
// 定义委托事件
|
||||||
@ -35,7 +37,7 @@ public class Starthost : MonoBehaviour
|
|||||||
private GameObject peopleposition;//人员的位置信息
|
private GameObject peopleposition;//人员的位置信息
|
||||||
//非主持人的画面
|
//非主持人的画面
|
||||||
public bool ishost=false;
|
public bool ishost=false;
|
||||||
private Button ready;
|
public Button ready;
|
||||||
private Image image;
|
private Image image;
|
||||||
|
|
||||||
//语音内容
|
//语音内容
|
||||||
@ -58,8 +60,7 @@ public class Starthost : MonoBehaviour
|
|||||||
audioSource= GetComponent<AudioSource>();
|
audioSource= GetComponent<AudioSource>();
|
||||||
// 确保对讲机图标默认隐藏
|
// 确保对讲机图标默认隐藏
|
||||||
walkieTalkieIcon.SetActive(false);
|
walkieTalkieIcon.SetActive(false);
|
||||||
|
ishost = ReadRoom.instance.isenter;
|
||||||
|
|
||||||
right =transform.Find("Panel1/right").gameObject;
|
right =transform.Find("Panel1/right").gameObject;
|
||||||
panel = transform.Find("Panel1").gameObject;
|
panel = transform.Find("Panel1").gameObject;
|
||||||
posiBtn = transform.Find("Panel1/right/under/btnRenYuanDaoWei").GetComponent<Button>();
|
posiBtn = transform.Find("Panel1/right/under/btnRenYuanDaoWei").GetComponent<Button>();
|
||||||
|
@ -10001,6 +10001,52 @@ Transform:
|
|||||||
m_CorrespondingSourceObject: {fileID: 424166, guid: dd642d046532d6449b5c8884a203ada2, type: 3}
|
m_CorrespondingSourceObject: {fileID: 424166, guid: dd642d046532d6449b5c8884a203ada2, type: 3}
|
||||||
m_PrefabInstance: {fileID: 436677384}
|
m_PrefabInstance: {fileID: 436677384}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!1 &437306171
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 437306173}
|
||||||
|
- component: {fileID: 437306172}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: BurstCollisionWorld
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!114 &437306172
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 437306171}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: f1a161c4294214a4fbcb7e9e94800494, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
cellSpans:
|
||||||
|
m_AlignBytes: 16
|
||||||
|
--- !u!4 &437306173
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 437306171}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 45
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &437592029
|
--- !u!1 &437592029
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -13425,6 +13471,14 @@ PrefabInstance:
|
|||||||
propertyPath: m_IsActive
|
propertyPath: m_IsActive
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1407198451437384586, guid: 940be89243a038b4090a77556e45a06d, type: 3}
|
||||||
|
propertyPath: m_SizeDelta.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1407198451437384586, guid: 940be89243a038b4090a77556e45a06d, type: 3}
|
||||||
|
propertyPath: m_SizeDelta.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 1407198451904434455, guid: 940be89243a038b4090a77556e45a06d, type: 3}
|
- target: {fileID: 1407198451904434455, guid: 940be89243a038b4090a77556e45a06d, type: 3}
|
||||||
propertyPath: m_SizeDelta.x
|
propertyPath: m_SizeDelta.x
|
||||||
value: 0
|
value: 0
|
||||||
@ -28691,7 +28745,7 @@ GameObject:
|
|||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 0
|
m_IsActive: 1
|
||||||
--- !u!81 &1707678917
|
--- !u!81 &1707678917
|
||||||
AudioListener:
|
AudioListener:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -33923,52 +33977,6 @@ MeshCollider:
|
|||||||
m_Convex: 0
|
m_Convex: 0
|
||||||
m_CookingOptions: 30
|
m_CookingOptions: 30
|
||||||
m_Mesh: {fileID: -6030086789198283598, guid: 00003e04dc9a2534eb207f108c7b0cd3, type: 3}
|
m_Mesh: {fileID: -6030086789198283598, guid: 00003e04dc9a2534eb207f108c7b0cd3, type: 3}
|
||||||
--- !u!1 &2079273703
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 2079273705}
|
|
||||||
- component: {fileID: 2079273704}
|
|
||||||
m_Layer: 0
|
|
||||||
m_Name: BurstCollisionWorld
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!114 &2079273704
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 2079273703}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: f1a161c4294214a4fbcb7e9e94800494, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
cellSpans:
|
|
||||||
m_AlignBytes: 16
|
|
||||||
--- !u!4 &2079273705
|
|
||||||
Transform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 2079273703}
|
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
||||||
m_ConstrainProportionsScale: 0
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 0}
|
|
||||||
m_RootOrder: 45
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
--- !u!64 &2081431309
|
--- !u!64 &2081431309
|
||||||
MeshCollider:
|
MeshCollider:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -45683,7 +45691,7 @@ GameObject:
|
|||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 0
|
m_IsActive: 1
|
||||||
--- !u!81 &4163391439018457502
|
--- !u!81 &4163391439018457502
|
||||||
AudioListener:
|
AudioListener:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -60223,6 +60231,7 @@ MonoBehaviour:
|
|||||||
scaleDuration: 2
|
scaleDuration: 2
|
||||||
alertwindow: {fileID: 0}
|
alertwindow: {fileID: 0}
|
||||||
ishost: 1
|
ishost: 1
|
||||||
|
ready: {fileID: 0}
|
||||||
walkieTalkieIcon: {fileID: 5640692782032870078}
|
walkieTalkieIcon: {fileID: 5640692782032870078}
|
||||||
dialogueText: {fileID: 5640692781696125076}
|
dialogueText: {fileID: 5640692781696125076}
|
||||||
staticNoiseClip: {fileID: 8300000, guid: 5912e270549bdb04c848923fd9751319, type: 3}
|
staticNoiseClip: {fileID: 8300000, guid: 5912e270549bdb04c848923fd9751319, type: 3}
|
||||||
@ -60342,7 +60351,7 @@ GameObject:
|
|||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 0
|
m_IsActive: 1
|
||||||
--- !u!222 &5640692783309111107
|
--- !u!222 &5640692783309111107
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -64584,6 +64593,7 @@ MonoBehaviour:
|
|||||||
scaleDuration: 2
|
scaleDuration: 2
|
||||||
alertwindow: {fileID: 0}
|
alertwindow: {fileID: 0}
|
||||||
ishost: 0
|
ishost: 0
|
||||||
|
ready: {fileID: 0}
|
||||||
walkieTalkieIcon: {fileID: 0}
|
walkieTalkieIcon: {fileID: 0}
|
||||||
dialogueText: {fileID: 0}
|
dialogueText: {fileID: 0}
|
||||||
staticNoiseClip: {fileID: 0}
|
staticNoiseClip: {fileID: 0}
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user