Room列表菜单添加

This commit is contained in:
ALIENJACK\alien 2024-09-18 15:53:58 +08:00
parent 68f121df60
commit f4adf4e20f
27 changed files with 9400 additions and 1851 deletions

View File

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

View File

@ -0,0 +1,973 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &29419265480821815
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8126322204359135913}
- component: {fileID: 2718916271043989317}
- component: {fileID: 3380485461544738227}
m_Layer: 5
m_Name: Descript
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8126322204359135913
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 29419265480821815}
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: 8789823129857705082}
m_RootOrder: 1
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: 33}
m_Pivot: {x: 0, y: 1}
--- !u!222 &2718916271043989317
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 29419265480821815}
m_CullTransparentMesh: 1
--- !u!114 &3380485461544738227
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 29419265480821815}
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: 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_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 20
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 2
m_MaxSize: 300
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: DESCRIPTION
--- !u!1 &734025543935719296
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1323634865265500141}
- component: {fileID: 5792146190930927166}
- component: {fileID: 2619187604372594158}
- component: {fileID: 1779247868001543556}
- component: {fileID: 4496630961732192070}
- component: {fileID: 2059277597780235898}
m_Layer: 5
m_Name: shadowIcon
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1323634865265500141
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 734025543935719296}
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: 6087025893861054323}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5792146190930927166
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 734025543935719296}
m_CullTransparentMesh: 1
--- !u!114 &2619187604372594158
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 734025543935719296}
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_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 230e155ce0d5a8d4283675d040631efc, 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 &1779247868001543556
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 734025543935719296}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f8b2ed11d675446c5a49da1ea296d490, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Version: 300
m_EffectMaterial: {fileID: 21305736874167728, guid: aee96bc531e6eba468ec405e536f515f, type: 2}
m_EffectFactor: 0
m_ColorFactor: 0
m_BlurFactor: 0
m_EffectMode: 0
m_ColorMode: 1
m_BlurMode: 3
m_AdvancedBlur: 1
m_ShadowBlur: 1
m_ShadowStyle: 0
m_ShadowColor: {r: 0, g: 0, b: 0, a: 1}
m_EffectDistance: {x: 1, y: -1}
m_UseGraphicAlpha: 1
m_EffectColor: {r: 1, g: 1, b: 1, a: 1}
m_AdditionalShadows: []
--- !u!114 &4496630961732192070
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 734025543935719296}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0848bff101191904ead4bb831f7084db, type: 3}
m_Name:
m_EditorClassIdentifier:
m_BlurFactor: 1
m_Style: 3
m_AdditionalShadows: []
m_EffectColor: {r: 1, g: 1, b: 1, a: 0}
m_EffectDistance: {x: 8, y: 8}
m_UseGraphicAlpha: 0
--- !u!95 &2059277597780235898
Animator:
serializedVersion: 3
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 734025543935719296}
m_Enabled: 1
m_Avatar: {fileID: 0}
m_Controller: {fileID: 9100000, guid: 0b3ccf7414d2ead43be0cd33b6e1b53c, type: 2}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
--- !u!1 &1776357407830023228
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6087025893861054323}
- component: {fileID: 7036072602178187444}
- component: {fileID: 6771349210554360888}
- component: {fileID: 3709368495556978651}
m_Layer: 5
m_Name: Icon
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6087025893861054323
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1776357407830023228}
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: 1323634865265500141}
- {fileID: 331028397738758164}
m_Father: {fileID: 8754483333502849411}
m_RootOrder: 0
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: 1, y: 0.5}
--- !u!222 &7036072602178187444
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1776357407830023228}
m_CullTransparentMesh: 1
--- !u!114 &6771349210554360888
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1776357407830023228}
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_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 230e155ce0d5a8d4283675d040631efc, 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 &3709368495556978651
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1776357407830023228}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: 144
m_PreferredHeight: 104
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &1813396448589485488
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4467178468921796307}
- component: {fileID: 8568189430970172828}
- component: {fileID: 6941538197753025297}
m_Layer: 5
m_Name: SelectArrow
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4467178468921796307
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1813396448589485488}
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: 331028397738758164}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 0, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 63, y: 70}
m_Pivot: {x: 0, y: 0.5}
--- !u!222 &8568189430970172828
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1813396448589485488}
m_CullTransparentMesh: 1
--- !u!114 &6941538197753025297
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1813396448589485488}
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: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: -1023481969782777897, guid: d518d00d4940e854bbe45d9ef891401a, 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 &3189920797946144379
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1998281097548910301}
- component: {fileID: 5344633969095406978}
- component: {fileID: 5700455559359757662}
m_Layer: 5
m_Name: Room_Template
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1998281097548910301
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3189920797946144379}
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: 8754483333502849411}
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: 0}
m_SizeDelta: {x: 144, y: 104}
m_Pivot: {x: 0, y: 0.5}
--- !u!114 &5344633969095406978
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3189920797946144379}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 13190caeb949d3541bfcb2b2f66b5d45, type: 3}
m_Name:
m_EditorClassIdentifier:
Icon: {fileID: 6771349210554360888}
Txt: {fileID: 991446423622995247}
Descript: {fileID: 3380485461544738227}
Root: {fileID: 8754483333502849411}
ShadowIcon: {fileID: 2619187604372594158}
InfoNode: {fileID: 5331629140490413834}
SubMenuItemGroup: {fileID: 4672405243908051711}
SelectScale: 1
UnSelectScale: 1
RomGroupRoot: {fileID: 3086674949377227884}
--- !u!114 &5700455559359757662
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3189920797946144379}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: 200
m_PreferredHeight: 230
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &3462611600707696275
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2303118795734916657}
- component: {fileID: 6792036789108903940}
- component: {fileID: 4997733671603798451}
m_Layer: 5
m_Name: viewport
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2303118795734916657
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3462611600707696275}
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: 8865437771338118001}
m_Father: {fileID: 331028397738758164}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6792036789108903940
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3462611600707696275}
m_CullTransparentMesh: 1
--- !u!114 &4997733671603798451
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3462611600707696275}
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: 0}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
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 &3811189825355447390
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 331028397738758164}
- component: {fileID: 3428297980621487917}
- component: {fileID: 4672405243908051711}
- component: {fileID: 3086674949377227884}
m_Layer: 5
m_Name: RomGroupScroll
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &331028397738758164
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3811189825355447390}
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: 2303118795734916657}
- {fileID: 4467178468921796307}
m_Father: {fileID: 6087025893861054323}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 0.000015258789, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0.5}
--- !u!114 &3428297980621487917
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3811189825355447390}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1aa08ab6e0800fa44ae55d278d1423e3, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Content: {fileID: 8865437771338118001}
m_Horizontal: 0
m_Vertical: 1
m_MovementType: 0
m_Elasticity: 0.1
m_Inertia: 1
m_DecelerationRate: 0.135
m_ScrollSensitivity: 1
m_Viewport: {fileID: 2303118795734916657}
m_HorizontalScrollbar: {fileID: 0}
m_VerticalScrollbar: {fileID: 0}
m_HorizontalScrollbarVisibility: 0
m_VerticalScrollbarVisibility: 0
m_HorizontalScrollbarSpacing: 0
m_VerticalScrollbarSpacing: 0
m_OnValueChanged:
m_PersistentCalls:
m_Calls: []
--- !u!114 &4672405243908051711
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3811189825355447390}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1d1e3e91ac34bc8468f357ee247ffb6a, type: 3}
m_Name:
m_EditorClassIdentifier:
PulseInvoke_Delay: 0.4
PulseInvoke_Interval: 0.05
m_menuItemRoot: {fileID: 0}
SubMenuItemTemplate: {fileID: 0}
alphaGroup: {fileID: 0}
m_selectItemPosition: {x: 50, y: -51}
step: 50
splitStep: 200
m_selectArrow: {fileID: 4467178468921796307}
ArrowOffset: 60
WidthFix: 280
itemGroup: {fileID: 6055880809428073973}
srollRect: {fileID: 3428297980621487917}
--- !u!225 &3086674949377227884
CanvasGroup:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3811189825355447390}
m_Enabled: 1
m_Alpha: 1
m_Interactable: 1
m_BlocksRaycasts: 1
m_IgnoreParentGroups: 0
--- !u!1 &3993825260653792697
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8789823129857705082}
- component: {fileID: 3252398029444565139}
- component: {fileID: 5331629140490413834}
m_Layer: 5
m_Name: InfoNode
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8789823129857705082
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3993825260653792697}
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: 6095356919362338847}
- {fileID: 8126322204359135913}
m_Father: {fileID: 8754483333502849411}
m_RootOrder: 1
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.5}
--- !u!114 &3252398029444565139
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3993825260653792697}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 20
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 3
m_Spacing: 0
m_ChildForceExpandWidth: 0
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 1
m_ChildControlHeight: 0
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 0
--- !u!225 &5331629140490413834
CanvasGroup:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3993825260653792697}
m_Enabled: 1
m_Alpha: 1
m_Interactable: 1
m_BlocksRaycasts: 1
m_IgnoreParentGroups: 0
--- !u!1 &5340761592919397836
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6095356919362338847}
- component: {fileID: 7651669947470814669}
- component: {fileID: 991446423622995247}
m_Layer: 5
m_Name: Name
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6095356919362338847
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5340761592919397836}
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: 8789823129857705082}
m_RootOrder: 0
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: 33}
m_Pivot: {x: 0, y: 1}
--- !u!222 &7651669947470814669
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5340761592919397836}
m_CullTransparentMesh: 1
--- !u!114 &991446423622995247
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5340761592919397836}
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: 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_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 20
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 2
m_MaxSize: 300
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: NAME
--- !u!1 &6164337287601107676
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8865437771338118001}
- component: {fileID: 6055880809428073973}
- component: {fileID: 1286529697012677180}
m_Layer: 5
m_Name: RomGroup
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8865437771338118001
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6164337287601107676}
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: 2303118795734916657}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!114 &6055880809428073973
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6164337287601107676}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fdacbe30e88f6a844a435595a4affdbb, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 0
m_StartCorner: 0
m_StartAxis: 0
m_CellSize: {x: 500, y: 200}
m_Spacing: {x: 0, y: 20}
m_Constraint: 1
m_ConstraintCount: 1
ItemTemplate: {fileID: 1998281097548910301, guid: 0ac8c8821ffacb847b872cdb10e0ac3d, type: 3}
ViewRect: {fileID: 2303118795734916657}
PauseUpdateView: 0
--- !u!114 &1286529697012677180
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6164337287601107676}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalFit: 0
m_VerticalFit: 2
--- !u!1 &8290338740711049006
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8754483333502849411}
- component: {fileID: 3637207717728009549}
- component: {fileID: 557410003364511780}
m_Layer: 5
m_Name: Root
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8754483333502849411
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8290338740711049006}
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: 6087025893861054323}
- {fileID: 8789823129857705082}
m_Father: {fileID: 1998281097548910301}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 0, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 130}
m_Pivot: {x: 0, y: 0.5}
--- !u!114 &3637207717728009549
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8290338740711049006}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 3
m_Spacing: 0
m_ChildForceExpandWidth: 0
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 1
m_ChildControlHeight: 1
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 0
--- !u!114 &557410003364511780
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8290338740711049006}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalFit: 2
m_VerticalFit: 0

View File

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

View File

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

View File

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

View File

@ -38,7 +38,7 @@ namespace AxibugEmuOnline.Client.Manager
App.log.Info("登录成功");
App.user.InitMainUserData(App.user.userdata.Account, msg.UID);
App.log.Info("获取服务器列表");
App.log.Info("获取Room列表");
App.roomMgr.SendGetRoomList();
}
else

View File

@ -34,7 +34,7 @@ namespace AxibugEmuOnline.Client
callback.Invoke(resp);
}
private IEnumerator GetNesRomInfo(int RomID, Action<Resp_RomInfo> callback)
public IEnumerator GetNesRomInfo(int RomID, Action<Resp_RomInfo> callback)
{
UnityWebRequest request = UnityWebRequest.Get($"{WebSiteApi}/RomInfo?PType={PlatformType.Nes}&RomID={RomID}");
yield return request.SendWebRequest();

View File

@ -20,6 +20,8 @@ namespace AxibugEmuOnline.Client.UI
List<MenuData> MenuSetting;
[SerializeField]
float HoriRollSpd = 1f;
[SerializeField]
int InitSelect = -1;
private RectTransform groupRootRect => m_menuItemRoot as RectTransform;
@ -27,16 +29,21 @@ namespace AxibugEmuOnline.Client.UI
private List<CanvasGroup> m_runtimeMenuUICanvas;
private Sequence seq;
protected override void Start()
{
base.Start();
m_runtimeMenuUICanvas = m_runtimeMenuUI.Select(menu => menu.gameObject.AddComponent<CanvasGroup>()).ToList();
m_runtimeMenuUICanvas.ForEach(canv => canv.gameObject.AddComponent<AutoRaycastCanvasGroup>());
if (InitSelect != -1)
{
m_selectIndex = InitSelect;
PlaySelectItemAnim(false);
}
}
public override void Init(List<MenuData> menuDataList)
{
}
public override void Init(List<MenuData> menuDataList) { }
public void EnterDetailState()
{
@ -58,7 +65,6 @@ namespace AxibugEmuOnline.Client.UI
);
seq.Play();
}
public void ExitDetailState()
@ -84,6 +90,11 @@ namespace AxibugEmuOnline.Client.UI
}
protected override void OnSelectMenuChanged()
{
PlaySelectItemAnim(true);
}
private void PlaySelectItemAnim(bool useAnim)
{
var step = GroupRoot.spacing;
var needSelectItem = m_runtimeMenuUI[SelectIndex];
@ -100,12 +111,19 @@ namespace AxibugEmuOnline.Client.UI
item.SetSelectState(i == SelectIndex);
}
rollTween = DOTween.To(
() => groupRootRect.anchoredPosition,
(x) => groupRootRect.anchoredPosition = x,
targetPosition,
HoriRollSpd)
.SetSpeedBased();
if (useAnim)
{
rollTween = DOTween.To(
() => groupRootRect.anchoredPosition,
(x) => groupRootRect.anchoredPosition = x,
targetPosition,
HoriRollSpd)
.SetSpeedBased();
}
else
{
groupRootRect.anchoredPosition = targetPosition;
}
}
protected override void OnCmdSelectItemLeft()

View File

@ -151,6 +151,7 @@ namespace AxibugEmuOnline.Client
{
if (m_bPoped)
{
ReleaseRuntimeMenus();
m_runtimeMenuItems.Clear();
SelectBorder.gameObject.SetActiveEx(false);

View File

@ -1,20 +1,15 @@
using AxibugEmuOnline.Client.ClientCore;
using AxibugEmuOnline.Client.UI;
using DG.Tweening;
using DG.Tweening.Core;
using DG.Tweening.Plugins.Options;
using Codice.Client.Common;
using System;
using UnityEngine;
using App = AxibugEmuOnline.Client.ClientCore.App;
namespace AxibugEmuOnline.Client
{
public class RomListMenuItem : MenuItem
public class RomListMenuItem : VirtualSubMenuItem
{
[SerializeField]
CanvasGroup RomGroupRoot;
[SerializeField]
EnumPlatform Platform;
private TweenerCore<float, float, FloatOptions> m_showTween;
protected EnumPlatform Platform;
private RomLib RomLib
{
@ -30,77 +25,9 @@ namespace AxibugEmuOnline.Client
}
}
protected override void Awake()
protected override void GetVirtualListDatas(Action<object> datas)
{
base.Awake();
RomGroupRoot.gameObject.SetActive(false);
RomGroupRoot.alpha = 0;
}
public override void SetSelectState(bool selected)
{
if (m_select == selected) return;
m_select = selected;
if (ShadowIcon != null) ShadowIcon.gameObject.SetActiveEx(selected);
if (progressTween != null) { progressTween.Kill(); progressTween = null; }
progressTween = DOTween.To(() => m_progress, (x) => m_progress = x, m_select ? 1 : 0, 5)
.SetSpeedBased().OnUpdate(() =>
{
if (InfoNode != null) InfoNode.alpha = m_progress;
Root.localScale = Vector3.one * Mathf.Lerp(UnSelectScale, SelectScale, m_progress);
});
}
public override bool OnEnterItem()
{
RomGroupRoot.gameObject.SetActive(true);
RomGroupRoot.alpha = 0;
if (m_showTween != null)
{
m_showTween.Kill();
m_showTween = null;
}
m_showTween = DOTween.To(() => RomGroupRoot.alpha, (x) => RomGroupRoot.alpha = x, 1, 0.2f);
var thirdMenuGroup = SubMenuItemGroup as ThirdMenuRoot;
thirdMenuGroup.itemGroup.Clear();
RomLib.FetchRomCount((roms) =>
{
var thirdMenuGroup = SubMenuItemGroup as ThirdMenuRoot;
thirdMenuGroup.itemGroup.UpdateDependencyProperty(thirdMenuGroup);
thirdMenuGroup.itemGroup.SetData(roms);
thirdMenuGroup.itemGroup.UpdateProxyVisualState();
thirdMenuGroup.ResetToFirst();
});
if (SubMenuItemGroup != null) SubMenuItemGroup.SetSelect(true);
return true;
}
public override bool OnExitItem()
{
if (m_showTween != null)
{
m_showTween.Kill();
m_showTween = null;
}
m_showTween = DOTween.To(() => RomGroupRoot.alpha, (x) => RomGroupRoot.alpha = x, 0, 0.2f)
.OnComplete(() =>
{
RomGroupRoot.gameObject.SetActive(false);
});
if (SubMenuItemGroup != null) SubMenuItemGroup.SetSelect(false);
return true;
RomLib.FetchRomCount((roms) => datas.Invoke(roms));
}
}
}

View File

@ -0,0 +1,91 @@
using AxibugEmuOnline.Client.ClientCore;
using AxibugEmuOnline.Client.UI;
using AxibugProtobuf;
using System;
using UnityEngine;
using UnityEngine.UI;
namespace AxibugEmuOnline.Client
{
public class RoomItem : MenuItem, IVirtualItem
{
[SerializeField]
Image m_roomPreview;
[SerializeField]
Slider m_downloadProgress;
[SerializeField]
GameObject m_downloadingFlag;
[SerializeField]
GameObject m_romReadyFlag;
private RomFile m_romFile;
public int Index { get; set; }
public void SetData(object data)
{
if (data is Protobuf_Room_MiniInfo roomInfo)
{
var hostNick = roomInfo.GetHostNickName();
roomInfo.GetRoomPlayers(out var cur, out var max);
SetBaseInfo(string.Empty, $"<b>{hostNick}</b>ľÄˇżźä - {cur}/{max}");
SetIcon(null);
roomInfo.FetchRomFileInRoomInfo(EnumPlatform.NES, (romFile) =>
{
m_romFile = romFile;
if (romFile.ID == roomInfo.GameRomID)
Txt.text = romFile.Alias;
UpdateRomInfoView();
App.CacheMgr.GetSpriteCache(romFile.ImageURL, OnGetRomImage);
});
}
}
private void Update()
{
UpdateRomInfoView();
}
private void UpdateRomInfoView()
{
float? downloadingProgress = null;
bool romReady = false;
if (m_romFile != null)
{
if (m_romFile.IsDownloading)
downloadingProgress = m_romFile.Progress;
if (m_romFile.RomReady)
romReady = true;
}
m_downloadingFlag.SetActiveEx(downloadingProgress.HasValue);
if (downloadingProgress.HasValue)
m_downloadProgress.value = downloadingProgress.Value;
m_romReadyFlag.SetActiveEx(romReady);
}
private void OnGetRomImage(Sprite sprite, string url)
{
if (m_romFile == null) return;
if (m_romFile.ImageURL != url) return;
SetIcon(sprite);
}
public void SetDependencyProperty(object data)
{
SetSelectState(data is ThirdMenuRoot tr && tr.SelectIndex == Index);
}
public void Release()
{
Reset();
}
}
}

View File

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

View File

@ -0,0 +1,34 @@
using AxibugEmuOnline.Client.ClientCore;
using AxibugProtobuf;
using System;
using System.Collections;
using System.Collections.Generic;
namespace AxibugEmuOnline.Client
{
public class RoomListMenuItem : VirtualSubMenuItem
{
protected override void GetVirtualListDatas(Action<object> datas)
{
App.StartCoroutine(Test(datas));
}
private IEnumerator Test(Action<object> datas)
{
yield return null;
List<Protobuf_Room_MiniInfo> fakeData = new List<Protobuf_Room_MiniInfo>()
{
new Protobuf_Room_MiniInfo{ GameRomID = 1, RoomID = 1, HostPlayerUID = 1, Player1UID = 1, Player1NickName = "Test1"},
new Protobuf_Room_MiniInfo{ GameRomID = 2, RoomID = 2, HostPlayerUID = 2, Player1UID = 2, Player1NickName = "Test2"},
new Protobuf_Room_MiniInfo{ GameRomID = 3, RoomID = 3, HostPlayerUID = 3, Player1UID = 3, Player1NickName = "Test3"},
new Protobuf_Room_MiniInfo{ GameRomID = 4, RoomID = 4, HostPlayerUID = 4, Player1UID = 4, Player1NickName = "Test4"},
new Protobuf_Room_MiniInfo{ GameRomID = 5, RoomID = 5, HostPlayerUID = 5, Player1UID = 5, Player1NickName = "Test5"},
};
datas.Invoke(fakeData);
yield break;
}
}
}

View File

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

View File

@ -86,8 +86,8 @@ namespace AxibugEmuOnline.Client
{
Vector2 itemPos = itemGroup.GetItemAnchorePos(index);
Vector3[] corners = new Vector3[4];
Vector2 targetPos = itemGroup.transform.InverseTransformPoint(m_selectArrow.position);
Vector3[] corners = new Vector3[4];
itemGroup.RectTransform.GetLocalCorners(corners);
targetPos = targetPos - (Vector2)corners[1];

View File

@ -0,0 +1,98 @@
using AxibugEmuOnline.Client.UI;
using DG.Tweening;
using DG.Tweening.Core;
using DG.Tweening.Plugins.Options;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using VirtualNes.Core;
using App = AxibugEmuOnline.Client.ClientCore.App;
namespace AxibugEmuOnline.Client
{
public abstract class VirtualSubMenuItem : MenuItem
{
[SerializeField]
protected CanvasGroup RomGroupRoot;
private TweenerCore<float, float, FloatOptions> m_showTween;
protected override void Awake()
{
base.Awake();
RomGroupRoot.gameObject.SetActive(false);
RomGroupRoot.alpha = 0;
}
public override void SetSelectState(bool selected)
{
if (m_select == selected) return;
m_select = selected;
if (ShadowIcon != null) ShadowIcon.gameObject.SetActiveEx(selected);
if (progressTween != null) { progressTween.Kill(); progressTween = null; }
progressTween = DOTween.To(() => m_progress, (x) => m_progress = x, m_select ? 1 : 0, 5)
.SetSpeedBased().OnUpdate(() =>
{
if (InfoNode != null) InfoNode.alpha = m_progress;
Root.localScale = Vector3.one * Mathf.Lerp(UnSelectScale, SelectScale, m_progress);
});
}
public override bool OnEnterItem()
{
RomGroupRoot.gameObject.SetActive(true);
RomGroupRoot.alpha = 0;
if (m_showTween != null)
{
m_showTween.Kill();
m_showTween = null;
}
m_showTween = DOTween.To(() => RomGroupRoot.alpha, (x) => RomGroupRoot.alpha = x, 1, 0.2f);
var thirdMenuGroup = SubMenuItemGroup as ThirdMenuRoot;
thirdMenuGroup.itemGroup.Clear();
GetVirtualListDatas((datas) =>
{
var thirdMenuGroup = SubMenuItemGroup as ThirdMenuRoot;
thirdMenuGroup.itemGroup.UpdateDependencyProperty(thirdMenuGroup);
thirdMenuGroup.itemGroup.SetData(datas);
thirdMenuGroup.itemGroup.UpdateProxyVisualState();
thirdMenuGroup.ResetToFirst();
});
if (SubMenuItemGroup != null) SubMenuItemGroup.SetSelect(true);
return true;
}
protected abstract void GetVirtualListDatas(Action<object> datas);
public override bool OnExitItem()
{
if (m_showTween != null)
{
m_showTween.Kill();
m_showTween = null;
}
m_showTween = DOTween.To(() => RomGroupRoot.alpha, (x) => RomGroupRoot.alpha = x, 0, 0.2f)
.OnComplete(() =>
{
RomGroupRoot.gameObject.SetActive(false);
});
if (SubMenuItemGroup != null) SubMenuItemGroup.SetSelect(false);
return true;
}
}
}

View File

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

View File

@ -1,3 +1,6 @@
using AxibugEmuOnline.Client.ClientCore;
using AxibugProtobuf;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
@ -13,5 +16,49 @@ namespace AxibugEmuOnline.Client
go.SetActive(active);
}
public static string GetHostNickName(this Protobuf_Room_MiniInfo roomInfo)
{
var hostUID = roomInfo.HostPlayerUID;
if (hostUID == roomInfo.Player1UID) return roomInfo.Player1NickName;
else if (hostUID == roomInfo.Player2UID) return roomInfo.Player2NickName;
else if (hostUID == roomInfo.Player3UID) return roomInfo.Player3NickName;
else if (hostUID == roomInfo.Player4UID) return roomInfo.Player4NickName;
else return string.Empty;
}
public static void GetRoomPlayers(this Protobuf_Room_MiniInfo roomInfo, out int current, out int max)
{
current = 0; max = 4;
if (roomInfo.Player1UID > 0) current++;
if (roomInfo.Player2UID > 0) current++;
if (roomInfo.Player3UID > 0) current++;
if (roomInfo.Player4UID > 0) current++;
}
private static Dictionary<int, RomFile> s_RomFileCahcesInRoomInfo = new Dictionary<int, RomFile>();
public static void FetchRomFileInRoomInfo(this Protobuf_Room_MiniInfo roomInfo, EnumPlatform platform, Action<RomFile> callback)
{
if (s_RomFileCahcesInRoomInfo.TryGetValue(roomInfo.GameRomID, out RomFile romFile))
{
callback.Invoke(romFile);
return;
}
switch (platform)
{
case EnumPlatform.NES:
App.StartCoroutine(App.httpAPI.GetNesRomInfo(roomInfo.GameRomID, (romWebData) =>
{
RomFile romFile = new RomFile(EnumPlatform.NES, 0, 0);
romFile.SetWebData(romWebData);
callback.Invoke(romFile);
s_RomFileCahcesInRoomInfo[roomInfo.GameRomID] = romFile;
}));
break;
}
}
}
}