fix:设置房间人数添加至少两人限制

This commit is contained in:
bzx
2025-11-27 18:31:24 +08:00
parent 38174fe174
commit 221224cf68
11 changed files with 41577 additions and 8572 deletions

View File

@@ -0,0 +1,59 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &8494777228749532300
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: -8679921383154817045, guid: 61ab1bd0a9d61584fa9445fee3dab280, type: 3}
propertyPath: m_LocalPosition.x
value: -1.49
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 61ab1bd0a9d61584fa9445fee3dab280, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 61ab1bd0a9d61584fa9445fee3dab280, type: 3}
propertyPath: m_LocalPosition.z
value: 4.54
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 61ab1bd0a9d61584fa9445fee3dab280, type: 3}
propertyPath: m_LocalRotation.w
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 61ab1bd0a9d61584fa9445fee3dab280, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 61ab1bd0a9d61584fa9445fee3dab280, type: 3}
propertyPath: m_LocalRotation.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 61ab1bd0a9d61584fa9445fee3dab280, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 61ab1bd0a9d61584fa9445fee3dab280, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 61ab1bd0a9d61584fa9445fee3dab280, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 180
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 61ab1bd0a9d61584fa9445fee3dab280, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: 61ab1bd0a9d61584fa9445fee3dab280, type: 3}
propertyPath: m_Name
value: "\u8FBD\u5B81\u978D\u5C719.26\u65B0\u5E97\u5730\u5F62"
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 61ab1bd0a9d61584fa9445fee3dab280, type: 3}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: b05b80c2acbcb894c8708e5aec5afb1a
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -648,7 +648,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &7822314074319250458
RectTransform:
m_ObjectHideFlags: 0
@@ -959,6 +959,141 @@ MonoBehaviour:
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!1 &3742008748958266009
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 9202820109421309638}
- component: {fileID: 4613401918687207801}
- component: {fileID: 7019783071741969335}
m_Layer: 0
m_Name: Text (TMP) (2)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &9202820109421309638
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3742008748958266009}
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: 1063200187910553120}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 2, y: -176}
m_SizeDelta: {x: 511.796, y: 147.51}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4613401918687207801
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3742008748958266009}
m_CullTransparentMesh: 1
--- !u!114 &7019783071741969335
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3742008748958266009}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: "\u81F3\u5C11\u4E24\u4EBA\u5F00\u59CB\u6E38\u620F"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 89ab9c0de7048464988f78e4b75d0030, type: 2}
m_sharedMaterial: {fileID: -8322952896378848084, guid: 89ab9c0de7048464988f78e4b75d0030,
type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4278190335
m_fontColor: {r: 1, g: 0, b: 0, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 33.34
m_fontSizeBase: 33.34
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &4164974606648343953
GameObject:
m_ObjectHideFlags: 0
@@ -1304,6 +1439,7 @@ MonoBehaviour:
IsInit: 0
lastTxt: {fileID: 2077215614350448442}
tenTxt: {fileID: 779452841920095530}
tipTxt: {fileID: 7019783071741969335}
--- !u!1 &5939056968979904597
GameObject:
m_ObjectHideFlags: 0
@@ -2184,7 +2320,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!224 &1063200187910553120
RectTransform:
m_ObjectHideFlags: 0
@@ -2203,6 +2339,7 @@ RectTransform:
- {fileID: 6293608038665404952}
- {fileID: 623542185966269176}
- {fileID: 8404423804009710812}
- {fileID: 9202820109421309638}
- {fileID: 385765599094856877}
m_Father: {fileID: 5670767679311589233}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

File diff suppressed because it is too large Load Diff

View File

@@ -71,8 +71,6 @@ public class GameLocal : MonoBehaviour
public GameObject Scene;
public GameObject Settle;
public GameObject BlueWin;
public GameObject RedWin;
public Transform redDoorPos;
public Transform blueDoorPos;

View File

@@ -427,20 +427,6 @@ public class GameManager : NetworkBehaviour
// }
}
[ClientRpc]
public void RpcShowWin(bool isBlue)
{
GameLocal.Ins.Settle.SetActive(false);
if (isBlue)
{
GameLocal.Ins.BlueWin.SetActive(true);
}
else
{
GameLocal.Ins.RedWin.SetActive(true);
}
}
[ClientRpc]
public void RpcShow()
{

View File

@@ -1,4 +1,5 @@
using System.Collections.Generic;
using DragonLi.Core;
using TMPro;
using UnityEngine;
using XUI;
@@ -15,6 +16,7 @@ public class ConPanel : UIBehaviour
public TextMeshProUGUI lastTxt;
public TextMeshProUGUI tenTxt;
public TextMeshProUGUI tipTxt;
private int lastIndex = 0;
private int tenIndex = 0;
@@ -34,6 +36,7 @@ public class ConPanel : UIBehaviour
IsInit = true;
lastTxt.text = 0.ToString();
tenTxt.text = 0.ToString();
tipTxt.text = "";
}
public void Update()
@@ -120,6 +123,15 @@ public class ConPanel : UIBehaviour
public void OnCreateRoomClick()
{
GameLocal.Ins.addPlayerIndex = (tenIndex * 10) + lastIndex;
if (GameLocal.Ins.addPlayerIndex <= 1)
{
tipTxt.text = "至少两人开始游戏";
CoroutineTaskManager.Instance.WaitSecondTodo(() =>
{
tipTxt.text = "";
}, 2f);
return;
}
CreateRoom();
}
}

Binary file not shown.

View File

@@ -0,0 +1,109 @@
fileFormatVersion: 2
guid: 61ab1bd0a9d61584fa9445fee3dab280
ModelImporter:
serializedVersion: 22200
internalIDToNameTable: []
externalObjects: {}
materials:
materialImportMode: 2
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
removeConstantScaleCurves: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 0
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importPhysicalCameras: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
nodeNameCollisionStrategy: 1
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
optimizeBones: 1
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
strictVertexDataChecks: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
referencedClips: []
importAnimation: 1
humanDescription:
serializedVersion: 3
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
globalScale: 1
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
autoGenerateAvatarMappingIfUnspecified: 1
animationType: 2
humanoidOversampling: 1
avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
importBlendShapeDeformPercent: 1
remapMaterialsIfMaterialImportModeIsNone: 0
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -8,99 +8,9 @@ EditorBuildSettings:
- enabled: 1
path: Assets/_MrCs/Scenes/Company1Floor.unity
guid: 386a8fdea01af8a4e8d4a9835407ddec
- enabled: 0
path: Assets/_MrCs/Scenes/Nianjing_Yuhua_Wanxiang.unity
guid: de12cf3c1375bb8439ae1be0d5dee138
- enabled: 0
path: Assets/_MrCs/Scenes/NanJing_Xinlin_WanDaMao.unity
guid: 38f8a5b34d448d344ad16694bbce5b43
- enabled: 0
path: Assets/_MrCs/Scenes/Yangzhou_Hanjiang_Tansuozhongxin.unity
guid: 8a10a86e45d1b0c4092a86c772b4f6c4
- enabled: 0
path: Assets/_MrCs/Scenes/Yangzhou_Hanjiang_Tansuozhongxin_wai.unity
guid: 457e02ca2c277b94da863d77465d8f33
- enabled: 0
path: Assets/_MrCs/Scenes/Zhejiang_Jinhua_KeJiGuan.unity
guid: 326f0997f94f105428b7638aaff2d4de
- enabled: 0
path: Assets/_MrCs/Scenes/Guangzhou_Panyv_Zhanting.unity
guid: 7a7fe69b4d8dd6440b69c5972278edc6
- enabled: 0
path: Assets/_MrCs/Scenes/Anhui_Wuhu_Guanwei.unity
guid: 1dd69a13e42411a439ae7c9be1bb2605
- enabled: 0
path: Assets/_MrCs/Scenes/Zhejiang_Shaoxing_Shengzhou.unity
guid: 49e434493879d5c41a5a37f762bfa384
- enabled: 0
path: Assets/_MrCs/Scenes/Jilin_Tonghua_Liuhe.unity
guid: 53809c4d20d2b65468ae1abf39b8b663
- enabled: 0
path: Assets/_MrCs/Scenes/Hunan_Jishou_Qianzhou_Tianhong.unity
guid: 37c4b4b78fbae4b42af576fc4f762a1b
- enabled: 0
path: Assets/_MrCs/Scenes/Shandong_Langfang_QingzhouTaihuacheng.unity
guid: 9b71fb7b579123d489a56059293aa919
- enabled: 0
path: Assets/_MrCs/Scenes/Shandong_Jining_Shangchang_nei.unity
guid: 55a6fd2557ba6d24db6d37bd44d7fa84
- enabled: 0
path: Assets/_MrCs/Scenes/Shandong_Jining_Shangchang.unity
guid: 920d9af8630c49c4e8e7a314a3e22880
- enabled: 0
path: Assets/_MrCs/Scenes/LiaoNing_AnShan.unity
guid: 0fceecbaa9ae0914794e85f2d8660c6f
- enabled: 0
path: Assets/_MrCs/Scenes/HangZhou_Longhutianjie.unity
guid: d0e46dc1397348647a733f6101154a68
- enabled: 0
path: Assets/_MrCs/Scenes/Shandong_Jinan_huaiyin_Shengfutongshangmao_wai.unity
guid: 439b83fe9dbe147439ddcadc9e000417
- enabled: 0
path: Assets/_MrCs/Scenes/Shandong_Jinan_huaiyin_Shengfutongshangmao.unity
guid: dcacc2b4246fce94099e8f4b8d008b0a
- enabled: 0
path: Assets/_MrCs/Scenes/Nanjing_Qixia_Yaohuamen_Jindiguangchang.unity
guid: 732213bc863cd134c97d823c40e0ccce
- enabled: 0
path: Assets/_MrCs/Scenes/Anhui_Suzhou_Yueshan_Guchengshangyejie.unity
guid: d325eee282a27a14a941971ceca5e485
- enabled: 0
path: Assets/_MrCs/Scenes/Gansu_Longnan_Shicheng_Dongsheng.unity
guid: c1888e6aa0dbce747b59fbde9289af68
- enabled: 0
path: Assets/_MrCs/Scenes/Shandong_Heze_Yuncheng_Gufuli.unity
guid: fa28d51b264480e4fa549d51376f3a96
- enabled: 0
path: Assets/_MrCs/Scenes/Wulanhaote_Ouya_Shangchang.unity
guid: c489d9a6cdf43e14682bb45090457400
- enabled: 0
path: Assets/_MrCs/Scenes/Wulanhaote_Wanda_Shangchang.unity
guid: b2fb54226f5e6f0479b0eb57371a2326
- enabled: 0
path: Assets/_MrCs/Scenes/Yunnan_Mile_Jinchen_Shidaiguangchang.unity
guid: b0adfc7f0176eb54abf690304cf893b8
- enabled: 0
path: Assets/_MrCs/Scenes/Xinjiang_Yili_Yining_Wanrong.unity
guid: 2c7c96a0a47fa74478c3ac11ae4f3cd3
- enabled: 0
path: Assets/_MrCs/Scenes/Hunan_Hengyang_Zhuhui_Dongzhoudao.unity
guid: ab829f8916bb4b543988025289aaf714
- enabled: 0
path: Assets/_MrCs/Scenes/Yunnan_Lincang_Linxiang_Hengji.unity
guid: a795322129c84504cbeaaca1b0c9ffb1
- enabled: 0
path: Assets/_MrCs/Scenes/Yunnan_Lincang_Linxiang_Hengji_Dixia.unity
guid: a0f00ae27c51c5640b468800dd26bece
- enabled: 0
path: Assets/_MrCs/Scenes/Guangxi_Guilin_Gongcheng_Shijixincheng.unity
guid: bac18c97d38f15544be96a881c3aa06a
- enabled: 0
path: Assets/_MrCs/Scenes/Guangdong_Shenzhen_Guangming_Wanda.unity
guid: 67da85770bf678b438d2fc5819b68dac
- enabled: 0
path: Assets/_MrCs/Scenes/Jiangsu_Xvzhou_Fengxian_Wuyueguangchang.unity
guid: 89d7af01bbb19d347a032884cf908dd8
m_configObjects:
Unity.XR.PXR.Settings: {fileID: 11400000, guid: d0f8149c48842b4488cf6fb974cff9a2,
type: 2}

View File

@@ -163,7 +163,7 @@ PlayerSettings:
androidSupportedAspectRatio: 1
androidMaxAspectRatio: 2.1
applicationIdentifier:
Android: com.pineappletech.mrcs.gongsi1lou
Android: com.pineappletech.mrcs.zhejiangshaoxingshengzhou
Standalone: com.DefaultCompany.com.unity.template.ar
buildNumber:
Standalone: 0