制作创建房间 查看房间逻辑

This commit is contained in:
YangHua 2023-11-06 17:35:13 +08:00
parent 47026ad064
commit c3437116bd
24 changed files with 3037 additions and 8915 deletions

View File

@ -0,0 +1,551 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &5439774739866624483
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5439774739866624480}
- component: {fileID: 5439774739866624495}
- component: {fileID: 5439774739866624494}
- component: {fileID: 5439774739866624481}
m_Layer: 5
m_Name: Settings1_btn
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5439774739866624480
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5439774739866624483}
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_Children: []
m_Father: {fileID: 5439774740515736047}
m_RootOrder: 3
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: 460, y: 0}
m_SizeDelta: {x: 20, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5439774739866624495
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5439774739866624483}
m_CullTransparentMesh: 0
--- !u!114 &5439774739866624494
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5439774739866624483}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: c02f394c24db27943ac83b088c420adc, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &5439774739866624481
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5439774739866624483}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 2
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 21300000, guid: f12f95ddb8760a94696fbeb42eef4181, type: 3}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 5439774739866624494}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1 &5439774739926437793
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5439774739926437806}
- component: {fileID: 5439774739926437805}
- component: {fileID: 5439774739926437804}
- component: {fileID: 5439774739926437807}
m_Layer: 5
m_Name: delete1_btn
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5439774739926437806
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5439774739926437793}
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_Children: []
m_Father: {fileID: 5439774740515736047}
m_RootOrder: 4
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: 510, y: 0}
m_SizeDelta: {x: 18, y: 19}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5439774739926437805
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5439774739926437793}
m_CullTransparentMesh: 0
--- !u!114 &5439774739926437804
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5439774739926437793}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: d1730a4264942c94491c38c2529c615f, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &5439774739926437807
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5439774739926437793}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 21300000, guid: bb0fdf4dc2b95964db131777ed884626, type: 3}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 5439774739926437804}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1 &5439774740515736046
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5439774740515736047}
- component: {fileID: 5439774740515736045}
- component: {fileID: 5439774740515736044}
m_Layer: 5
m_Name: reveal1_iam
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5439774740515736047
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5439774740515736046}
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_Children:
- {fileID: 5439774741093915038}
- {fileID: 5439774740868476256}
- {fileID: 5439774741587608357}
- {fileID: 5439774739866624480}
- {fileID: 5439774739926437806}
m_Father: {fileID: 0}
m_RootOrder: 0
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: 0, y: 30}
m_SizeDelta: {x: 1301, y: 40}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5439774740515736045
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5439774740515736046}
m_CullTransparentMesh: 0
--- !u!114 &5439774740515736044
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5439774740515736046}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: c6e4471eb05fd7d42bdf99c495a8a694, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &5439774740868476259
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5439774740868476256}
- component: {fileID: 5439774740868476270}
- component: {fileID: 5439774740868476257}
m_Layer: 5
m_Name: Text (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5439774740868476256
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5439774740868476259}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.3, y: 0.3, z: 0.3}
m_Children: []
m_Father: {fileID: 5439774740515736047}
m_RootOrder: 1
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: -220, y: 0}
m_SizeDelta: {x: 264.61078, y: 133.33334}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5439774740868476270
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5439774740868476259}
m_CullTransparentMesh: 0
--- !u!114 &5439774740868476257
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5439774740868476259}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 0.995283, b: 0.995283, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 80
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 80
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: "\u6559\u5E08"
--- !u!1 &5439774741093915025
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5439774741093915038}
- component: {fileID: 5439774741093915036}
- component: {fileID: 5439774741093915039}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5439774741093915038
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5439774741093915025}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.3, y: 0.3, z: 0.3}
m_Children: []
m_Father: {fileID: 5439774740515736047}
m_RootOrder: 0
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: -517, y: 0}
m_SizeDelta: {x: 264.61078, y: 133.33334}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5439774741093915036
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5439774741093915025}
m_CullTransparentMesh: 0
--- !u!114 &5439774741093915039
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5439774741093915025}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 0.995283, b: 0.995283, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 80
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 80
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 1#
--- !u!1 &5439774741587608356
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5439774741587608357}
- component: {fileID: 5439774741587608355}
- component: {fileID: 5439774741587608354}
m_Layer: 5
m_Name: Text (2)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5439774741587608357
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5439774741587608356}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.3, y: 0.3, z: 0.3}
m_Children: []
m_Father: {fileID: 5439774740515736047}
m_RootOrder: 2
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: 133, y: 0}
m_SizeDelta: {x: 264.61078, y: 133.33334}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5439774741587608355
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5439774741587608356}
m_CullTransparentMesh: 0
--- !u!114 &5439774741587608354
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5439774741587608356}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 0.995283, b: 0.995283, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 80
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 80
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: xxxx

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b77355080a46df84e8b0de5548d7addd
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,10 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class View_Panel2Attatch : MonoBehaviour
{
public GameObject subject;
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 9243ad474ae9d6e43a848e226dc52d6c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -19,6 +19,7 @@ public class Login_panl : MonoBehaviour
public GameObject main_panl;//激活主页面
public RectTransform login_panl;//失活主页面
public RectTransform Main_page;//背景界面失活
void Start()
{
login_btn.onClick.AddListener(Login);

View File

@ -257,6 +257,7 @@ public class SubjectsInfoItemm
/// </summary>
public List<TrainDestListItem> TrainDestList ;
}
[Serializable]
public class TrainDestListItem
{
/// <summary>
@ -280,6 +281,7 @@ public class TrainDestListItem
/// </summary>
public string blueseatIds ;
}
[Serializable]
public class SeatInfosItemm
{
/// <summary>

View File

@ -5,6 +5,22 @@ using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
using XFrame.Core.UI;
using RDate;
using UnityEngine.Networking;
[Serializable]
public class ReturnRoomID
{
public bool state;
public string message;
public string data;
}
public class RoomInfo
{
public string Name;
public string MissionModel;
public string ThinkingId;
}
public class View_Panel2 : XUIPanel
{
@ -22,14 +38,7 @@ public class View_Panel2 : XUIPanel
public Button submit_btn;//席位分配提交按钮
public Image selector_panl;//选择人员页面
public Button off3_btn;//选择人员页面叉掉按钮
public Button yemian_btn1;//页面按钮
public Button yemian_btn2;
public Button yemian_btn3;
public Button yemian_btn4;
public Button yemian_btn5;
public Button yemian_btn6;
public Button yemian_btn7;
public Button yemian_btn8;
public Button tijiao_btn;//提交按钮
public Button quxiao_btn;//取消按钮
public Image Storm_and_capture_panl;//红方蓝方
@ -38,97 +47,249 @@ public class View_Panel2 : XUIPanel
public Button entering_key_btn;//进入导调按钮
public Transform place;//需要生成地方
public GameObject root_pan;//需要生成房间预设体
public List<Text> roomnamelist=new List<Text>();//创建房间的名字
public List<Text> roomnamelist = new List<Text>();//创建房间的名字
public List<string> rootlist = new List<string>();//存入房间的名字
public List<Button> buttonlist = new List<Button>();//克隆出来房间按钮
public string roomUrl = "http://111.229.30.246:48888/Handler/Practice.ashx?action=query&state=0,1,2";
public string userUrl = "http://111.229.30.246:48888/Handler/User.ashx?action=all&role_code=04";
public RoomData roomdata = new RoomData();
public UserData userData = new UserData();
public Dropdown roomModelDropdown;//房间模式
public Dropdown thinkingDropdown;//选择想定
public Transform reveal;
public Transform subjectContent;
public GameObject revealPrefab;
public GameObject subjectItem;
public string currentThinkName;
public GameObject userItem;
public Transform userConent;
public InputField nameInputField;
public InputField jobInputField;
public string currentRoomName;
public string currentMissionModel;
public string currentThinkingId;
public GameObject currentRoomSubjectItem;
public Transform currentRoomSubjectItemConnect;
public Dictionary<int, string> currentThinkingIds = new Dictionary<int, string>();
public View_Panel2() : base(UIType.Normal, UIMode.HideOther, UICollider.Normal)
{
uiPath = "UIPanel/View_Panel2";
}
public override void Awake(GameObject go)
{
roomModelDropdown = this.transform.Find("append_room_panl/roomModelDropdown").GetComponent<Dropdown>();
thinkingDropdown = this.transform.Find("append_room_panl/thinkingDropdown").GetComponent<Dropdown>();
append_room_panl = GameObject.Find("View_Panel2(Clone)").transform.GetChild(2).GetComponent<Image>();
Fork_off_btn = GameObject.Find("View_Panel2(Clone)").transform.GetChild(2).transform.GetChild(1).GetComponent<Button>();
room_input = GameObject.Find("View_Panel2(Clone)").transform.GetChild(2).transform.GetChild(3).GetComponent<InputField>();
scenario_btn =GameObject.Find("View_Panel2(Clone)").transform.GetChild(0).transform.GetChild(2).GetComponent<Button>();
scenario_btn = GameObject.Find("View_Panel2(Clone)").transform.GetChild(0).transform.GetChild(2).GetComponent<Button>();
verify_btn = GameObject.Find("View_Panel2(Clone)").transform.GetChild(2).transform.GetChild(8).GetComponent<Button>();
cancel_btno = GameObject.Find("View_Panel2(Clone)").transform.GetChild(2).transform.GetChild(9).GetComponent<Button>();
tips_txt = GameObject.Find("View_Panel2(Clone)").transform.GetChild(2).transform.GetChild(10).GetComponent<Text>();
distribution_panl = GameObject.Find("View_Panel2(Clone)").transform.GetChild(3).GetComponent<Image>();
off_btn = GameObject.Find("View_Panel2(Clone)").transform.GetChild(3).transform.GetChild(1).GetComponent<Button>();
submit_btn = GameObject.Find("View_Panel2(Clone)").transform.GetChild(3).transform.GetChild(5).GetComponent<Button>();
selector_panl = GameObject.Find("View_Panel2(Clone)").transform.GetChild(4).GetComponent<Image>();
off3_btn = GameObject.Find("View_Panel2(Clone)").transform.GetChild(4).transform.GetChild(1).GetComponent<Button>();
place = GameObject.Find("View_Panel2(Clone)").transform.GetChild(1).transform.GetChild(0).transform.GetChild(0).GetComponent<Transform>();
yemian_btn1 = GameObject.Find("View_Panel2(Clone)").transform.GetChild(3).transform.GetChild(3).transform.GetChild(3).transform.GetChild(3).GetComponent<Button>();
yemian_btn2 = GameObject.Find("View_Panel2(Clone)").transform.GetChild(3).transform.GetChild(3).transform.GetChild(4).transform.GetChild(3).GetComponent<Button>();
yemian_btn3 = GameObject.Find("View_Panel2(Clone)").transform.GetChild(3).transform.GetChild(3).transform.GetChild(5).transform.GetChild(3).GetComponent<Button>();
yemian_btn4 = GameObject.Find("View_Panel2(Clone)").transform.GetChild(3).transform.GetChild(3).transform.GetChild(6).transform.GetChild(3).GetComponent<Button>();
yemian_btn5 = GameObject.Find("View_Panel2(Clone)").transform.GetChild(3).transform.GetChild(4).transform.GetChild(3).transform.GetChild(3).GetComponent<Button>();
yemian_btn6 = GameObject.Find("View_Panel2(Clone)").transform.GetChild(3).transform.GetChild(4).transform.GetChild(4).transform.GetChild(3).GetComponent<Button>();
yemian_btn7 = GameObject.Find("View_Panel2(Clone)").transform.GetChild(3).transform.GetChild(4).transform.GetChild(5).transform.GetChild(3).GetComponent<Button>();
yemian_btn8 = GameObject.Find("View_Panel2(Clone)").transform.GetChild(3).transform.GetChild(4).transform.GetChild(6).transform.GetChild(3).GetComponent<Button>();
tijiao_btn = GameObject.Find("View_Panel2(Clone)").transform.GetChild(4).transform.GetChild(8).GetComponent<Button>();
quxiao_btn = GameObject.Find("View_Panel2(Clone)").transform.GetChild(4).transform.GetChild(9).GetComponent<Button>();
Storm_and_capture_panl = GameObject.Find("View_Panel2(Clone)").transform.GetChild(5).GetComponent<Image>();
Cancel4_btn =GameObject.Find("View_Panel2(Clone)").transform.GetChild(5).transform.GetChild(1).GetComponent<Button>();
Cancel4_btn = GameObject.Find("View_Panel2(Clone)").transform.GetChild(5).transform.GetChild(1).GetComponent<Button>();
start_training_btn = GameObject.Find("View_Panel2(Clone)").transform.GetChild(5).transform.GetChild(6).GetComponent<Button>();
entering_key_btn = GameObject.Find("View_Panel2(Clone)").transform.GetChild(5).transform.GetChild(7).GetComponent<Button>();
root_pan = Resources.Load<GameObject>("UIPanel/generate_panl");
this.transform.Find("UPBG/Refresh_btn").GetComponent<Button>().onClick.AddListener(() =>
{
GetAllRoomData();
});
currentRoomSubjectItemConnect = Storm_and_capture_panl.transform.Find("Campsite_iamg/Subjects").GetComponent<ScrollRect>().content;
currentRoomSubjectItem = currentRoomSubjectItemConnect.GetChild(0).gameObject;
currentRoomSubjectItem.SetActive(false);
submit_btn = distribution_panl.transform.Find("submit_btn").GetComponent<Button>();
subjectContent = distribution_panl.transform.Find("SubjectsScrollView").GetComponent<ScrollRect>().content;
subjectItem = subjectContent.GetChild(0).gameObject;
revealPrefab = Resources.Load<GameObject>("Prefabs/reveal1_iam");
userConent = selector_panl.transform.Find("ID_panl/Personnel").GetComponent<ScrollRect>().content;
nameInputField = selector_panl.transform.Find("NameInputField").GetComponent<InputField>();
jobInputField = selector_panl.transform.Find("JobInputField").GetComponent<InputField>();
userItem = userConent.GetChild(0).gameObject;
thinkingDropdown.options.Clear();
for (int i = 0; i < UIBootstrap.Instance.traininginformations.Count; i++)
{
int index = i;
Dropdown.OptionData data = new Dropdown.OptionData();
data.text = UIBootstrap.Instance.traininginformations[index].Name;
currentThinkingIds.Add(index, UIBootstrap.Instance.traininginformations[index].Id);
thinkingDropdown.options.Add(data);
}
thinkingDropdown.onValueChanged.AddListener((index) =>
{
currentThinkName = thinkingDropdown.options[index].text;
currentThinkingId = currentThinkingIds[index];
CreateSubject();
});
roomModelDropdown.onValueChanged.AddListener(OnRoomModelDropdown);
currentMissionModel = roomModelDropdown.options[0].text;
this.transform.Find("UPBG/append_btn").GetComponent<Button>().onClick.AddListener(() =>
{
append_room_panl.gameObject.SetActive(true);
});
nameInputField.onValueChanged.AddListener((info) =>
{
Debug.Log("onValueChanged" + info);
FuzzySearch(info);
});
jobInputField.onValueChanged.AddListener((info) =>
{
FuzzySearch(info);
});
nameInputField.onEndEdit.AddListener((info) =>
{
Debug.Log("onEndEdit" + info);
});
Forkoffbtn();
Verify();
Submit();
Tiao();//生成人员页面
Cance();
Scenejump();//场景跳转按钮
append_room_panl.gameObject.SetActive(false);
GetAllRoomData();
GetAllUserData();
subjectItem.SetActive(false);
userItem.SetActive(false);
currentThinkName = thinkingDropdown.options[0].text;
CreateSubject();
}
private void Tiao()
public async void GetAllRoomData()
{
yemian_btn1.onClick.AddListener(() =>
roomdata = await AsyncWebReq.Post<RoomData>(roomUrl, null);
if (place.childCount > 0)
{
JiHUO();
});
yemian_btn2.onClick.AddListener(() =>
for (int i = 0; i < place.childCount; i++)
{
GameObject.Destroy(place.GetChild(i).gameObject);
}
}
CreateRoom();
}
public async void GetAllUserData()
{
userData = await AsyncWebReq.Post<UserData>(userUrl, null);
}
public void CreateAllUser(List<DataItem> userInfo)
{
if (userConent.childCount > 1)
{
JiHUO();
});
yemian_btn3.onClick.AddListener(() =>
for (int i = 1; i < userConent.childCount; i++)
{
GameObject.Destroy(userConent.GetChild(i).gameObject);
}
}
for (int i = 0; i < userInfo.Count; i++)
{
JiHUO();
});
yemian_btn4.onClick.AddListener(() =>
GameObject obj = GameObject.Instantiate(userItem, userConent);
obj.SetActive(true);
obj.transform.GetChild(0).GetComponent<Text>().text = userData.data[i].login_name;
obj.transform.GetChild(1).GetComponent<Text>().text = userData.data[i].job_number;
obj.transform.GetChild(2).GetComponent<Toggle>().group = userConent.GetComponent<ToggleGroup>();
}
}
/// <summary>
/// 创建 新建房间的科目
/// </summary>
public void CreateSubject()
{
if (subjectContent.childCount > 1)
{
JiHUO();
});
yemian_btn5.onClick.AddListener(() =>
for (int i = 1; i < subjectContent.childCount; i++)
{
GameObject.Destroy(subjectContent.GetChild(i).gameObject);
}
}
for (int i = 0; i < UIBootstrap.Instance.traininginformations.Count; i++)
{
JiHUO();
});
yemian_btn6.onClick.AddListener(() =>
{
JiHUO();
});
yemian_btn7.onClick.AddListener(() =>
{
JiHUO();
});
yemian_btn8.onClick.AddListener(() =>
{
JiHUO();
});
tijiao_btn.onClick.AddListener(() =>
{
selector_panl.gameObject.SetActive(false);
});
quxiao_btn.onClick.AddListener(() =>
{
selector_panl.gameObject.SetActive(false);
});
if (currentThinkName.Equals(UIBootstrap.Instance.traininginformations[i].Name))
{
for (int j = 0; j < UIBootstrap.Instance.traininginformations[i].subjectsInfo.Count; j++)
{
GameObject subjectTemp = GameObject.Instantiate(subjectItem, subjectContent);
subjectTemp.SetActive(true);
subjectTemp.transform.Find("Text").GetComponent<Text>().text = UIBootstrap.Instance.traininginformations[i].subjectsInfo[j].subjectName;
subjectTemp.transform.Find("Text").GetComponent<Text>().enabled = true;
if (UIBootstrap.Instance.traininginformations[i].subjectsInfo[j].TrainDestList.Count < 2)
{
subjectTemp.transform.GetChild(2).gameObject.SetActive(false);
}
if (subjectTemp != null)
{
Transform redParent = subjectTemp.transform.Find("red_panl/RedReveal");
Transform greenParent = subjectTemp.transform.Find("green_paml/GreenReveal");
if (redParent.childCount > 0)
{
for (int ii = 0; ii < redParent.childCount; ii++)
{
GameObject.Destroy(redParent.GetChild(ii).gameObject);
}
}
if (greenParent.childCount > 0)
{
for (int ii = 0; ii < greenParent.childCount; ii++)
{
GameObject.Destroy(greenParent.GetChild(ii).gameObject);
}
}
for (int k = 0; k < UIBootstrap.Instance.traininginformations[i].subjectsInfo[j].seatInfos.Count; k++)
{
///0 红方 1 蓝方
if (UIBootstrap.Instance.traininginformations[i].subjectsInfo[j].seatInfos[k].role.Equals("0"))
{
GameObject obj = GameObject.Instantiate(revealPrefab, redParent);
obj.transform.GetChild(0).GetComponent<Text>().text = Spilt(UIBootstrap.Instance.traininginformations[i].subjectsInfo[j].seatInfos[k].seatName, 0, 2);
obj.transform.GetChild(1).GetComponent<Text>().text = Spilt(UIBootstrap.Instance.traininginformations[i].subjectsInfo[j].seatInfos[k].seatName, 2, 2);
obj.transform.GetChild(2).GetComponent<Text>().text = UIBootstrap.Instance.traininginformations[i].subjectsInfo[j].seatInfos[k].seatno;
obj.transform.GetChild(3).GetComponent<Button>().onClick.AddListener(() =>
{
selector_panl.gameObject.SetActive(true);
CreateAllUser(userData.data);
});
}
else
{
GameObject obj = GameObject.Instantiate(revealPrefab, greenParent);
obj.transform.GetChild(0).GetComponent<Text>().text = Spilt(UIBootstrap.Instance.traininginformations[i].subjectsInfo[j].seatInfos[k].seatName, 0, 1);
obj.transform.GetChild(1).GetComponent<Text>().text = Spilt(UIBootstrap.Instance.traininginformations[i].subjectsInfo[j].seatInfos[k].seatName, 2, 2);
obj.transform.GetChild(2).GetComponent<Text>().text = UIBootstrap.Instance.traininginformations[i].subjectsInfo[j].seatInfos[k].seatno;
obj.transform.GetChild(3).GetComponent<Button>().onClick.AddListener(() =>
{
selector_panl.gameObject.SetActive(true);
CreateAllUser(userData.data);
});
}
}
}
}
}
}
}
public string Spilt(string data, int startIndex, int endIndex)
{
string msg = data.Substring(startIndex, endIndex);
return msg;
}
private void Scenejump()
@ -162,44 +323,91 @@ public class View_Panel2 : XUIPanel
});
}
/// <summary>
/// 房间查看按钮
/// </summary>
private void Roombtn()
public void CreateRoom()
{
for (int i = 0; i < buttonlist.Count; i++)
for (int i = 0; i < roomdata.data.Count; i++)
{
buttonlist[i].onClick.AddListener(() =>
if (roomdata.data[i].State != 2)
{
Storm_and_capture_panl.gameObject.SetActive(true);
});
CreateRoomBase(roomdata.data[i].Id, roomdata.data[i].Name);
}
}
}
public RDate.DataItem currentRoomData = new RDate.DataItem();
public void CreateRoomBase(string roomId, string name)
{
GameObject roomItem = GameObject.Instantiate(root_pan, place);
roomItem.name = roomId;
roomItem.transform.Find("Text").GetComponent<Text>().text = name;
roomItem.transform.Find("view_btn").GetComponent<Button>().onClick.AddListener(async () =>
{
Storm_and_capture_panl.gameObject.SetActive(true);
//currentRoomData = await AsyncWebReq.Get<RDate.DataItem>("http://111.229.30.246:48888/Handler/Practice.ashx?action=queryone&Id=" + roomItem.name);
for (int i = 0; i < roomdata.data.Count; i++)
{
if (roomItem.name.Equals(roomdata.data[i].Id))
{
currentRoomData = roomdata.data[i];
}
}
Debug.Log(currentRoomData.Id + "====" + roomItem.name);
Traininginformation tt = new Traininginformation();
tt = Jsonanalyze.FromJson<Traininginformation>(currentRoomData.ThinkingData);
CreateSubjectItem(tt);
});
}
/// <summary>
/// 创建查看房间的科目
/// </summary>
/// <param name="t"></param>
public void CreateSubjectItem(Traininginformation t)
{
if (currentRoomSubjectItemConnect.childCount > 1)
{
for (int i = 1; i < currentRoomSubjectItemConnect.childCount; i++)
{
GameObject.Destroy(currentRoomSubjectItemConnect.GetChild(i).gameObject);
}
}
for (int i = 0; i < t.subjectsInfo.Count; i++)
{
int index = i;
GameObject subjectTemp = GameObject.Instantiate(currentRoomSubjectItem, currentRoomSubjectItemConnect);
subjectTemp.name = t.subjectsInfo[index].subjectId;
subjectTemp.transform.GetChild(0).GetComponent<Text>().text = t.subjectsInfo[index].subjectName;
subjectTemp.SetActive(true);
subjectTemp.GetComponent<Button>().onClick.AddListener(() =>
{
Debug.Log(" subjectTemp.name ===" + subjectTemp.name);
});
}
}
/// <summary>
/// 分配面板提交按钮和取消人员选择按钮
/// </summary>
private void Submit()
{
int a=0;
submit_btn.onClick.AddListener(() =>
submit_btn.onClick.AddListener(async () =>
{
append_room_panl.gameObject.SetActive(false);
distribution_panl.gameObject.SetActive(false);
selector_panl.gameObject.SetActive(false);
GameObject.Instantiate(root_pan, place);
roomnamelist.Add(GameObject.Find("View_Panel2(Clone)").transform.GetChild(1).transform.GetChild(0).transform.GetChild(0).transform.GetChild(a).transform.GetChild(2).GetComponent<Text>());
buttonlist.Add(GameObject.Find("View_Panel2(Clone)").transform.GetChild(1).transform.GetChild(0).transform.GetChild(0).transform.GetChild(a).transform.GetChild(1).GetComponent<Button>());
for (int i = 0; i < rootlist.Count; i++)
{
roomnamelist[i].text = rootlist[i].ToString();
}
a++;
Roombtn();
});
ReturnRoomID returnRoomId = await AsyncWebReq.Post<ReturnRoomID>("http://111.229.30.246:48888/Handler/Practice.ashx?action=add&Name=" + currentRoomName + "&MissionModel=" + currentMissionModel + "&ThinkingId=" + currentThinkingId, null);
if (returnRoomId.state)
{
CreateRoomBase(returnRoomId.data, currentRoomName);
}
else
{
Debug.Log(returnRoomId.message);
}
});
off3_btn.onClick.AddListener(() =>
@ -216,10 +424,10 @@ public class View_Panel2 : XUIPanel
verify_btn.onClick.AddListener(() =>
{
if (room_input.text.Length>=1)
if (room_input.text.Length >= 1)
{
rootlist.Add(room_input.text);
distribution_panl.gameObject.SetActive(true);
currentRoomName = room_input.text;
}
else
{
@ -232,6 +440,15 @@ public class View_Panel2 : XUIPanel
});
}
public void OnRoomModelDropdown(int index)
{
currentMissionModel = roomModelDropdown.options[index].text;
}
public void OnTinkingDropdown(int index)
{
currentThinkingId = thinkingDropdown.options[index].text;
}
/// <summary>
/// 叉掉房间按钮
/// </summary>
@ -246,8 +463,27 @@ public class View_Panel2 : XUIPanel
append_room_panl.gameObject.SetActive(false);
});
}
public void JiHUO()
private char[] _specialChar = { '_', ' ', '\'', '\\', };
private List<DataItem> dataItemTemp = new List<DataItem>();
public void FuzzySearch(string searchName)
{
selector_panl.gameObject.SetActive(true );
dataItemTemp.Clear();
string name = searchName.Trim(_specialChar).Replace(" ", "");
for (int i = 0; i < userData.data.Count; i++)
{
if (userData.data[i].login_name.Contains(name) || userData.data[i].job_number.Contains(name))
{
if (!dataItemTemp.Contains(userData.data[i]))
dataItemTemp.Add(userData.data[i]);
}
}
if (dataItemTemp.Count > 0)
{
CreateAllUser(dataItemTemp);
}
}
}

View File

@ -121,6 +121,80 @@ NavMeshSettings:
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &70704332
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 70704333}
- component: {fileID: 70704335}
- component: {fileID: 70704334}
m_Layer: 5
m_Name: Image
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &70704333
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 70704332}
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_Children: []
m_Father: {fileID: 1624838409}
m_RootOrder: 1
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: 34, y: 0}
m_SizeDelta: {x: 24, y: 14}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &70704334
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 70704332}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 306e719adec013f4a872514155c88b2e, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &70704335
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 70704332}
m_CullTransparentMesh: 0
--- !u!1001 &87242910
PrefabInstance:
m_ObjectHideFlags: 0
@ -588,6 +662,80 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 283434452}
m_CullTransparentMesh: 0
--- !u!1 &285496011
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 285496012}
- component: {fileID: 285496014}
- component: {fileID: 285496013}
m_Layer: 5
m_Name: view_imag
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &285496012
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 285496011}
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_Children: []
m_Father: {fileID: 2118805285}
m_RootOrder: 0
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: 0, y: 20}
m_SizeDelta: {x: 360, y: 210}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &285496013
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 285496011}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 88ebc38893e19fe4c83443ee670cfbf3, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &285496014
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 285496011}
m_CullTransparentMesh: 0
--- !u!1 &305941370
GameObject:
m_ObjectHideFlags: 0
@ -986,7 +1134,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &561772550
GameObject:
@ -1029,7 +1177,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 5
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &705507993
GameObject:
@ -1121,7 +1269,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1 &835460215
GameObject:
@ -1374,7 +1522,7 @@ RectTransform:
- {fileID: 211396688}
- {fileID: 1240925094}
m_Father: {fileID: 0}
m_RootOrder: 4
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@ -1520,6 +1668,162 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: -0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &1010603557
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1010603558}
- component: {fileID: 1010603560}
- component: {fileID: 1010603559}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1010603558
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1010603557}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.3, y: 0.3, z: 0.3}
m_Children: []
m_Father: {fileID: 2118805285}
m_RootOrder: 2
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: -130, y: -120}
m_SizeDelta: {x: 400, y: 120}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1010603559
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1010603557}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.9528302, g: 0.92136884, b: 0.92136884, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 85
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 90
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: eeeeee
--- !u!222 &1010603560
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1010603557}
m_CullTransparentMesh: 0
--- !u!1 &1028753484
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1028753485}
- component: {fileID: 1028753487}
- component: {fileID: 1028753486}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1028753485
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1028753484}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.3, y: 0.3, z: 0.3}
m_Children: []
m_Father: {fileID: 1624838409}
m_RootOrder: 0
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: -18, y: 0.000024319}
m_SizeDelta: {x: 246.63535, y: 106.666626}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1028753486
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1028753484}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.9716981, g: 0.93044674, b: 0.93044674, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 85
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 90
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: "\u67E5\u770B"
--- !u!222 &1028753487
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1028753484}
m_CullTransparentMesh: 0
--- !u!1 &1067383903
GameObject:
m_ObjectHideFlags: 0
@ -2181,6 +2485,126 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1622990172}
m_CullTransparentMesh: 0
--- !u!1 &1624838408
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1624838409}
- component: {fileID: 1624838412}
- component: {fileID: 1624838411}
- component: {fileID: 1624838410}
m_Layer: 5
m_Name: view_btn
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1624838409
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1624838408}
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_Children:
- {fileID: 1028753485}
- {fileID: 70704333}
m_Father: {fileID: 2118805285}
m_RootOrder: 1
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: 125, y: -120}
m_SizeDelta: {x: 110, y: 32}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1624838410
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1624838408}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 2
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 21300000, guid: b53cf42599335744ab88c8b3c9801922, type: 3}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 1624838411}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!114 &1624838411
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1624838408}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: abe63c6c7a141e049b4b93716755df46, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &1624838412
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1624838408}
m_CullTransparentMesh: 0
--- !u!1 &1657186458
GameObject:
m_ObjectHideFlags: 0
@ -2440,7 +2864,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 6
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1939994039
MonoBehaviour:
@ -2574,13 +2998,90 @@ RectTransform:
- {fileID: 544024020}
- {fileID: 1473291347}
m_Father: {fileID: 0}
m_RootOrder: 3
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!1 &2118805282
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2118805285}
- component: {fileID: 2118805284}
- component: {fileID: 2118805283}
m_Layer: 5
m_Name: 1699250524524
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &2118805283
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2118805282}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 451bbf6744b153e41be3b369351dc87d, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &2118805284
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2118805282}
m_CullTransparentMesh: 0
--- !u!224 &2118805285
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2118805282}
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_Children:
- {fileID: 285496012}
- {fileID: 1624838409}
- {fileID: 1010603558}
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 250, y: -190}
m_SizeDelta: {x: 400, y: 300}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1001 &4190038652210028901
PrefabInstance:
m_ObjectHideFlags: 0

View File

@ -1,4 +1,4 @@
using RData;

using System.Collections;
using System.Collections.Generic;
using System.Threading;
@ -41,17 +41,7 @@ public class CreateRoomController : MonoBehaviour
public async void OnCreateRoom()
{
RoomData roomData = new RoomData();
roomData.Name = roomField.text;
roomData.ThinkingData = "ttttt";
roomData.MissionModel = "qqqqqqqq";
string roomDataTemp = JsonUtility.ToJson(roomData);
SyncCreateRoom.CreateRoom(roomDataTemp);
await SyncCreateRoom.ReciveMessage();
if (SyncCreateRoom.serverReturnValue.Equals("创建成功"))
{
Debug.Log("dsds ");
}
}
private void OnDisable()

View File

@ -1,16 +1,165 @@
using System;
using UnityEngine;
namespace RData
using System.Collections.Generic;
namespace RDate
{
/// <summary>
/// Name MissionModel ThinkingData
/// </summary>
[Serializable]
public class DataItem
{
/// <summary>
///
/// </summary>
public string Id ;
/// <summary>
///
/// </summary>
public string Name ;
/// <summary>
/// 岗位训练
/// </summary>
public string PracticeMode ;
/// <summary>
///
/// </summary>
public string Icon ;
/// <summary>
/// {"Id":"1698214124511","Name":"1025-2","PracticeMode":"岗位训练","subjectsInfo":[{"subjectId":"1698025133871","subjectName":"1023-1红蓝对抗","index":0,"stepInfo":"","SubTime":60,"seatInfo":"","mode":"红蓝对抗","earth":"丘陵","seatInfos":[{"seatId":"1698025248056001","seatName":"1#士兵","seatno":"0","role":"0"},{"seatId":"1698025248056002","seatName":"1#官员","seatno":"1","role":"1"},{"seatId":"1698025266203001","seatName":"2#士兵","seatno":"2","role":"0"},{"seatId":"1698025266203002","seatName":"2#官员","seatno":"3","role":"1"}],"TrainDestList":[{"TrainId":"1698025248056","TrainDest":"目标一","TrainGrade":"1","redseatIds":"1698025248056001","blueseatIds":"1698025248056002"},{"TrainId":"1698025266203","TrainDest":"目标二","TrainGrade":"2","redseatIds":"1698025266203001","blueseatIds":"1698025266203002"}]},{"subjectId":"1698025159822","subjectName":"1023-2集团对抗","index":1,"stepInfo":"","SubTime":40,"seatInfo":"","mode":"集团对抗","earth":"城市","seatInfos":[{"seatId":"1698025318422001","seatName":"1#士兵","seatno":"0","role":"0"},{"seatId":"1698025318422002","seatName":"1#士兵","seatno":"1","role":"1"},{"seatId":"1698025329169001","seatName":"1#官员","seatno":"2","role":"0"},{"seatId":"1698025329169002","seatName":"1#官员","seatno":"3","role":"1"}],"TrainDestList":[{"TrainId":"1698025318422","TrainDest":"集团1","TrainGrade":"1","redseatIds":"1698025318422001","blueseatIds":"1698025318422002"},{"TrainId":"1698025329169","TrainDest":"集团2","TrainGrade":"2","redseatIds":"1698025329169001","blueseatIds":"1698025329169002"}]}]}
/// </summary>
public string ThinkingData ;
/// <summary>
///
/// </summary>
public string SeatContent ;
/// <summary>
///
/// </summary>
public string DeviceContent ;
/// <summary>
///
/// </summary>
public string SubjectContent ;
/// <summary>
///
/// </summary>
public string OperateSupport ;
/// <summary>
///
/// </summary>
public string UserCount ;
/// <summary>
///
/// </summary>
public string Creater ;
/// <summary>
///
/// </summary>
public string CreateTime ;
/// <summary>
///
/// </summary>
public string StartTime ;
/// <summary>
///
/// </summary>
public string EndTime ;
/// <summary>
///
/// </summary>
public string UseTime ;
/// <summary>
///
/// </summary>
public int State ;
/// <summary>
///
/// </summary>
public string Memo ;
/// <summary>
///
/// </summary>
public string UpdateTime ;
/// <summary>
///
/// </summary>
public string IsDeleted ;
/// <summary>
///
/// </summary>
public string PubIP ;
/// <summary>
///
/// </summary>
public string SubIP ;
/// <summary>
///
/// </summary>
public string ProcessId ;
/// <summary>
///
/// </summary>
public string RoomArea ;
/// <summary>
/// 起始
/// </summary>
public string JoinUsers ;
/// <summary>
///
/// </summary>
public string Field_Decimal1 ;
/// <summary>
///
/// </summary>
public string Field_Decimal2 ;
/// <summary>
///
/// </summary>
public string Field_Decimal3 ;
/// <summary>
///
/// </summary>
public string Field_Char1 ;
/// <summary>
///
/// </summary>
public string Field_Char2 ;
/// <summary>
///
/// </summary>
public string Field_Char3 ;
/// <summary>
///
/// </summary>
public string Port ;
/// <summary>
///
/// </summary>
public string IpAddress ;
/// <summary>
/// 考核
/// </summary>
public string MissionModel ;
/// <summary>
///
/// </summary>
public string WebSocketIPAdress ;
/// <summary>
///
/// </summary>
public string RoomUdpAddress ;
}
[Serializable]
public class RoomData
{
public string Name;
public string MissionModel;
public string ThinkingData;
/// <summary>
///
/// </summary>
public string state ;
/// <summary>
///
/// </summary>
public string message ;
/// <summary>
///
/// </summary>
public List<DataItem> data ;
}
}

View File

@ -0,0 +1,147 @@
using System.Collections.Generic;
using System;
[Serializable]
public class DataItem
{
/// <summary>
///
/// </summary>
public string user_id ;
/// <summary>
///
/// </summary>
public string login_name ;
/// <summary>
///
/// </summary>
public string password ;
/// <summary>
/// 1#学员
/// </summary>
public string real_name ;
/// <summary>
///
/// </summary>
public string nick_name ;
/// <summary>
///
/// </summary>
public string sex ;
/// <summary>
///
/// </summary>
public string birth_date ;
/// <summary>
///
/// </summary>
public string mobile ;
/// <summary>
///
/// </summary>
public string phone ;
/// <summary>
///
/// </summary>
public string email ;
/// <summary>
/// 士兵
/// </summary>
public string job_number ;
/// <summary>
///
/// </summary>
public string id_card ;
/// <summary>
///
/// </summary>
public string photo ;
/// <summary>
///
/// </summary>
public int position ;
/// <summary>
///
/// </summary>
public int is_lock ;
/// <summary>
/// 有效
/// </summary>
public string job_state ;
/// <summary>
///
/// </summary>
public string job_time ;
/// <summary>
///
/// </summary>
public string create_time ;
/// <summary>
///
/// </summary>
public string dep_id ;
/// <summary>
///
/// </summary>
public string major ;
/// <summary>
///
/// </summary>
public string grade ;
/// <summary>
///
/// </summary>
public string salary ;
/// <summary>
///
/// </summary>
public string mac_address ;
/// <summary>
///
/// </summary>
public string phone_name ;
/// <summary>
///
/// </summary>
public string password_validity ;
/// <summary>
///
/// </summary>
public string role_code ;
/// <summary>
///
/// </summary>
public string r1 ;
/// <summary>
///
/// </summary>
public string r2 ;
/// <summary>
///
/// </summary>
public string r3 ;
/// <summary>
///
/// </summary>
public string r4 ;
/// <summary>
///
/// </summary>
public string r5 ;
}
[Serializable]
public class UserData
{
/// <summary>
///
/// </summary>
public string state ;
/// <summary>
///
/// </summary>
public string message ;
/// <summary>
///
/// </summary>
public List<DataItem> data ;
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: fbbd87c42539434409201ca13ea54e95
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,82 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MonoSingleton<T> : MonoBehaviour where T : MonoSingleton<T>
{
private static T instance;
private static object locker = new object();
// public static T Instance
// {
// get
// {
// return instance;
// }
// }
public static T Instance
{
get
{
if (instance == null)
{
lock (locker)
{
instance = FindObjectOfType<T>();
if (FindObjectsOfType<T>().Length > 1)
{
#if UNITY_EDITOR
Debug.LogError($"{typeof(T)} 不应该存在多个单例!");
#endif
return instance;
}
if (instance == null && Application.isPlaying)
{
var singleton = new GameObject();
instance = singleton.AddComponent<T>();
singleton.name = "(singleton)_" + typeof(T);
// singleton.hideFlags = HideFlags.None;
// DontDestroyOnLoad(singleton);
}
else
{
// DontDestroyOnLoad(instance.gameObject);
}
}
// instance.hideFlags = HideFlags.None;
}
return instance;
}
}
// public static bool IsInitialized
// {
// get
// {
// return instance != null;
// }
// }
// public virtual void Awake()
// {
// if (instance != null)
// {
// Debug.LogErrorFormat("Trying to instantiate a second instance of singleton class {0}", GetType().Name);
// }
// else
// {
// instance = (T)this;
// }
// }
// public virtual void OnDestroy()
// {
// if (instance == this)
// {
// instance = null;
// }
// }
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 383d02e408c998f46a10672931994d69
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -3,7 +3,7 @@ using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class UIBootstrap : MonoBehaviour
public class UIBootstrap : MonoSingleton<UIBootstrap>
{
public string url;
public Editinformation editinformation = new Editinformation();

View File

@ -16,7 +16,7 @@ public static class AsyncWebReq
var getRequest = CreateRequest(endpoint);
await getRequest.SendWebRequest();
#if UNITY_EDITOR
Debug.Log("async req : " + getRequest.downloadHandler.text);
Debug.Log("async Get req : " + getRequest.downloadHandler.text);
#endif
T result = JsonUtility.FromJson<T>(getRequest.downloadHandler.text);
getRequest.Dispose();
@ -29,7 +29,7 @@ public static class AsyncWebReq
var postRequest = CreateRequest(endpoint, RequestType.POST, payload);
await postRequest.SendWebRequest();
#if UNITY_EDITOR
Debug.Log("async req : " + postRequest.downloadHandler.text);
Debug.Log("async Post req : " + postRequest.downloadHandler.text);
Debug.Log("endpoint : " + endpoint);
#endif
T result = JsonUtility.FromJson<T>(postRequest.downloadHandler.text);
@ -37,7 +37,7 @@ public static class AsyncWebReq
return result;
}
private static UnityWebRequest CreateRequest(string path, RequestType type = RequestType.GET, object data = null)
public static UnityWebRequest CreateRequest(string path, RequestType type = RequestType.GET, object data = null)
{
var request = new UnityWebRequest(path, type.ToString());
if (data != null)

View File

@ -270,6 +270,9 @@
<Reference Include="NetMQ">
<HintPath>E:/UnityProjects/LGZN/Unity2019.4.9/New/NewN_UAVPlane/Assets/Plugins/NetMQ.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>E:/UnityProjects/LGZN/Unity2019.4.9/New/NewN_UAVPlane/Assets/Plugins/Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="DemiLib">
<HintPath>E:/UnityProjects/LGZN/Unity2019.4.9/New/NewN_UAVPlane/Assets/Plugins/Demigiant/DemiLib/Core/DemiLib.dll</HintPath>
</Reference>
@ -288,9 +291,6 @@
<Reference Include="DOTweenProEditor">
<HintPath>E:/UnityProjects/LGZN/Unity2019.4.9/New/NewN_UAVPlane/Assets/Plugins/Demigiant/DOTweenPro/Editor/DOTweenProEditor.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>E:/UnityProjects/LGZN/Unity2019.4.9/New/NewN_UAVPlane/Assets/Plugins/Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="netstandard">
<HintPath>E:/Unity/2019.4.9f1/Unity/Editor/Data/NetStandard/ref/2.0.0/netstandard.dll</HintPath>
</Reference>

View File

@ -270,6 +270,9 @@
<Reference Include="NetMQ">
<HintPath>E:/UnityProjects/LGZN/Unity2019.4.9/New/NewN_UAVPlane/Assets/Plugins/NetMQ.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>E:/UnityProjects/LGZN/Unity2019.4.9/New/NewN_UAVPlane/Assets/Plugins/Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="DemiLib">
<HintPath>E:/UnityProjects/LGZN/Unity2019.4.9/New/NewN_UAVPlane/Assets/Plugins/Demigiant/DemiLib/Core/DemiLib.dll</HintPath>
</Reference>
@ -288,9 +291,6 @@
<Reference Include="DOTweenProEditor">
<HintPath>E:/UnityProjects/LGZN/Unity2019.4.9/New/NewN_UAVPlane/Assets/Plugins/Demigiant/DOTweenPro/Editor/DOTweenProEditor.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>E:/UnityProjects/LGZN/Unity2019.4.9/New/NewN_UAVPlane/Assets/Plugins/Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="netstandard">
<HintPath>E:/Unity/2019.4.9f1/Unity/Editor/Data/NetStandard/ref/2.0.0/netstandard.dll</HintPath>
</Reference>

View File

@ -272,6 +272,9 @@
<Reference Include="NetMQ">
<HintPath>E:/UnityProjects/LGZN/Unity2019.4.9/New/NewN_UAVPlane/Assets/Plugins/NetMQ.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>E:/UnityProjects/LGZN/Unity2019.4.9/New/NewN_UAVPlane/Assets/Plugins/Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="DemiLib">
<HintPath>E:/UnityProjects/LGZN/Unity2019.4.9/New/NewN_UAVPlane/Assets/Plugins/Demigiant/DemiLib/Core/DemiLib.dll</HintPath>
</Reference>
@ -290,9 +293,6 @@
<Reference Include="DOTweenProEditor">
<HintPath>E:/UnityProjects/LGZN/Unity2019.4.9/New/NewN_UAVPlane/Assets/Plugins/Demigiant/DOTweenPro/Editor/DOTweenProEditor.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>E:/UnityProjects/LGZN/Unity2019.4.9/New/NewN_UAVPlane/Assets/Plugins/Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="nunit.framework">
<HintPath>E:/UnityProjects/LGZN/Unity2019.4.9/New/NewN_UAVPlane/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.dll</HintPath>
</Reference>

View File

@ -341,6 +341,9 @@
<Reference Include="NetMQ">
<HintPath>E:/UnityProjects/LGZN/Unity2019.4.9/New/NewN_UAVPlane/Assets/Plugins/NetMQ.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>E:/UnityProjects/LGZN/Unity2019.4.9/New/NewN_UAVPlane/Assets/Plugins/Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="DemiLib">
<HintPath>E:/UnityProjects/LGZN/Unity2019.4.9/New/NewN_UAVPlane/Assets/Plugins/Demigiant/DemiLib/Core/DemiLib.dll</HintPath>
</Reference>
@ -359,9 +362,6 @@
<Reference Include="DOTweenProEditor">
<HintPath>E:/UnityProjects/LGZN/Unity2019.4.9/New/NewN_UAVPlane/Assets/Plugins/Demigiant/DOTweenPro/Editor/DOTweenProEditor.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>E:/UnityProjects/LGZN/Unity2019.4.9/New/NewN_UAVPlane/Assets/Plugins/Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="netstandard">
<HintPath>E:/Unity/2019.4.9f1/Unity/Editor/Data/NetStandard/ref/2.0.0/netstandard.dll</HintPath>
</Reference>

View File

@ -271,6 +271,9 @@
<Reference Include="NetMQ">
<HintPath>E:/UnityProjects/LGZN/Unity2019.4.9/New/NewN_UAVPlane/Assets/Plugins/NetMQ.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>E:/UnityProjects/LGZN/Unity2019.4.9/New/NewN_UAVPlane/Assets/Plugins/Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="DemiLib">
<HintPath>E:/UnityProjects/LGZN/Unity2019.4.9/New/NewN_UAVPlane/Assets/Plugins/Demigiant/DemiLib/Core/DemiLib.dll</HintPath>
</Reference>
@ -289,9 +292,6 @@
<Reference Include="DOTweenProEditor">
<HintPath>E:/UnityProjects/LGZN/Unity2019.4.9/New/NewN_UAVPlane/Assets/Plugins/Demigiant/DOTweenPro/Editor/DOTweenProEditor.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>E:/UnityProjects/LGZN/Unity2019.4.9/New/NewN_UAVPlane/Assets/Plugins/Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="netstandard">
<HintPath>E:/Unity/2019.4.9f1/Unity/Editor/Data/NetStandard/ref/2.0.0/netstandard.dll</HintPath>
</Reference>

View File

@ -341,6 +341,9 @@
<Reference Include="NetMQ">
<HintPath>E:/UnityProjects/LGZN/Unity2019.4.9/New/NewN_UAVPlane/Assets/Plugins/NetMQ.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>E:/UnityProjects/LGZN/Unity2019.4.9/New/NewN_UAVPlane/Assets/Plugins/Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="DemiLib">
<HintPath>E:/UnityProjects/LGZN/Unity2019.4.9/New/NewN_UAVPlane/Assets/Plugins/Demigiant/DemiLib/Core/DemiLib.dll</HintPath>
</Reference>
@ -359,9 +362,6 @@
<Reference Include="DOTweenProEditor">
<HintPath>E:/UnityProjects/LGZN/Unity2019.4.9/New/NewN_UAVPlane/Assets/Plugins/Demigiant/DOTweenPro/Editor/DOTweenProEditor.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>E:/UnityProjects/LGZN/Unity2019.4.9/New/NewN_UAVPlane/Assets/Plugins/Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="netstandard">
<HintPath>E:/Unity/2019.4.9f1/Unity/Editor/Data/NetStandard/ref/2.0.0/netstandard.dll</HintPath>
</Reference>