Merge remote-tracking branch 'origin/master' into LouDi_Pig

This commit is contained in:
李浩 2025-01-15 08:46:31 +08:00
commit 32f720f33c
19 changed files with 596 additions and 128 deletions

View File

@ -59,12 +59,16 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 82127b0f7165d8448836e4fba0bce5b7, type: 3} m_Script: {fileID: 11500000, guid: 82127b0f7165d8448836e4fba0bce5b7, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
homeIcon: {fileID: 4524484033761581281}
homeBtn: {fileID: 6786675438613954589} homeBtn: {fileID: 6786675438613954589}
Score: {fileID: 2505519175557592291} Score: {fileID: 2505519175557592291}
scoreIcon: {fileID: 5356868582514685091}
scoreBtn: {fileID: 4619332097827032469} scoreBtn: {fileID: 4619332097827032469}
desIcon: {fileID: 7353137941944010191}
desBtn: {fileID: 7919768696017877647} desBtn: {fileID: 7919768696017877647}
set: {fileID: 6232319401915539582} setIcon: {fileID: 1693275654294396572}
setBtn: {fileID: 1379509841866064611} setBtn: {fileID: 1379509841866064611}
closeIcon: {fileID: 4865587638182302959}
closeBtn: {fileID: 8552533863496002200} closeBtn: {fileID: 8552533863496002200}
backBtn: {fileID: 1270587477707133155} backBtn: {fileID: 1270587477707133155}
Title: {fileID: 6296270029272226998} Title: {fileID: 6296270029272226998}
@ -408,8 +412,10 @@ GameObject:
- component: {fileID: 7233145839152708537} - component: {fileID: 7233145839152708537}
- component: {fileID: 1402148308183576929} - component: {fileID: 1402148308183576929}
- component: {fileID: 8746992706770596963} - component: {fileID: 8746992706770596963}
- component: {fileID: 5356868582514685091}
- component: {fileID: 8349855814183288798}
m_Layer: 5 m_Layer: 5
m_Name: score m_Name: scoreIcon
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
@ -456,7 +462,7 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Material: {fileID: 0} m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 0 m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1 m_Maskable: 1
m_OnCullStateChanged: m_OnCullStateChanged:
@ -472,6 +478,66 @@ MonoBehaviour:
m_FillOrigin: 0 m_FillOrigin: 0
m_UseSpriteMesh: 0 m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1 m_PixelsPerUnitMultiplier: 1
--- !u!114 &5356868582514685091
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1701073165711765044}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
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: 0}
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: 8746992706770596963}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!114 &8349855814183288798
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1701073165711765044}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0d51f3a7c41ab0346b49ae50d456bece, type: 3}
m_Name:
m_EditorClassIdentifier:
MarkType: 0
CustomComponentName: scoreIcon
CustomComment:
mComponentName: UnityEngine.UI.Button
--- !u!1 &2001560243448814407 --- !u!1 &2001560243448814407
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -483,8 +549,10 @@ GameObject:
- component: {fileID: 6525947030875717277} - component: {fileID: 6525947030875717277}
- component: {fileID: 789589784473835523} - component: {fileID: 789589784473835523}
- component: {fileID: 7028470492342371926} - component: {fileID: 7028470492342371926}
- component: {fileID: 4865587638182302959}
- component: {fileID: 4951605237632423165}
m_Layer: 5 m_Layer: 5
m_Name: close m_Name: closeIcon
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
@ -531,7 +599,7 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Material: {fileID: 0} m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 0 m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1 m_Maskable: 1
m_OnCullStateChanged: m_OnCullStateChanged:
@ -547,6 +615,66 @@ MonoBehaviour:
m_FillOrigin: 0 m_FillOrigin: 0
m_UseSpriteMesh: 0 m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1 m_PixelsPerUnitMultiplier: 1
--- !u!114 &4865587638182302959
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2001560243448814407}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
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: 0}
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: 7028470492342371926}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!114 &4951605237632423165
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2001560243448814407}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0d51f3a7c41ab0346b49ae50d456bece, type: 3}
m_Name:
m_EditorClassIdentifier:
MarkType: 0
CustomComponentName:
CustomComment:
mComponentName:
--- !u!1 &2066591663383786163 --- !u!1 &2066591663383786163
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1879,8 +2007,10 @@ GameObject:
- component: {fileID: 4996884698751205362} - component: {fileID: 4996884698751205362}
- component: {fileID: 3501697170914416043} - component: {fileID: 3501697170914416043}
- component: {fileID: 3350829478237842021} - component: {fileID: 3350829478237842021}
- component: {fileID: 4524484033761581281}
- component: {fileID: 28784141111070070}
m_Layer: 5 m_Layer: 5
m_Name: home m_Name: homeIcon
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
@ -1927,7 +2057,7 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Material: {fileID: 0} m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 0 m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1 m_Maskable: 1
m_OnCullStateChanged: m_OnCullStateChanged:
@ -1943,6 +2073,66 @@ MonoBehaviour:
m_FillOrigin: 0 m_FillOrigin: 0
m_UseSpriteMesh: 0 m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1 m_PixelsPerUnitMultiplier: 1
--- !u!114 &4524484033761581281
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7034543108323079013}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
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: 0}
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: 3350829478237842021}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!114 &28784141111070070
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7034543108323079013}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0d51f3a7c41ab0346b49ae50d456bece, type: 3}
m_Name:
m_EditorClassIdentifier:
MarkType: 0
CustomComponentName: scoreIcon
CustomComment:
mComponentName: UnityEngine.UI.Button
--- !u!1 &7666388055021823954 --- !u!1 &7666388055021823954
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -2030,8 +2220,9 @@ GameObject:
- component: {fileID: 3057372319391471786} - component: {fileID: 3057372319391471786}
- component: {fileID: 4079667323957122093} - component: {fileID: 4079667323957122093}
- component: {fileID: 25235571411346071} - component: {fileID: 25235571411346071}
- component: {fileID: 1693275654294396572}
m_Layer: 5 m_Layer: 5
m_Name: set m_Name: setIcon
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
@ -2079,7 +2270,7 @@ MonoBehaviour:
MarkType: 0 MarkType: 0
CustomComponentName: set CustomComponentName: set
CustomComment: CustomComment:
mComponentName: RectTransform mComponentName: UnityEngine.UI.Button
--- !u!114 &25235571411346071 --- !u!114 &25235571411346071
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -2110,6 +2301,50 @@ MonoBehaviour:
m_FillOrigin: 0 m_FillOrigin: 0
m_UseSpriteMesh: 0 m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1 m_PixelsPerUnitMultiplier: 1
--- !u!114 &1693275654294396572
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8846098100972990084}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
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: 0}
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: 25235571411346071}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1 &9012140064018885816 --- !u!1 &9012140064018885816
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -2121,8 +2356,10 @@ GameObject:
- component: {fileID: 8926716519125320169} - component: {fileID: 8926716519125320169}
- component: {fileID: 3215134167559067386} - component: {fileID: 3215134167559067386}
- component: {fileID: 4690001865151866587} - component: {fileID: 4690001865151866587}
- component: {fileID: 7353137941944010191}
- component: {fileID: 1176537812628747561}
m_Layer: 5 m_Layer: 5
m_Name: des m_Name: desIcon
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
@ -2169,7 +2406,7 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Material: {fileID: 0} m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 0 m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1 m_Maskable: 1
m_OnCullStateChanged: m_OnCullStateChanged:
@ -2185,3 +2422,63 @@ MonoBehaviour:
m_FillOrigin: 0 m_FillOrigin: 0
m_UseSpriteMesh: 0 m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1 m_PixelsPerUnitMultiplier: 1
--- !u!114 &7353137941944010191
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9012140064018885816}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
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: 0}
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: 4690001865151866587}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!114 &1176537812628747561
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9012140064018885816}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0d51f3a7c41ab0346b49ae50d456bece, type: 3}
m_Name:
m_EditorClassIdentifier:
MarkType: 0
CustomComponentName:
CustomComment:
mComponentName:

View File

@ -853,7 +853,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 2fafe2cfe61f6974895a912c3755e8f1, type: 3} m_Script: {fileID: 11500000, guid: 2fafe2cfe61f6974895a912c3755e8f1, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_AllowSwitchOff: 0 m_AllowSwitchOff: 1
--- !u!114 &1622034218903515943 --- !u!114 &1622034218903515943
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -987,7 +987,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
MarkType: 0 MarkType: 0
CustomComponentName: CustomComponentName: BtnContent
CustomComment: CustomComment:
mComponentName: RectTransform mComponentName: RectTransform
--- !u!1 &7473196182865972638 --- !u!1 &7473196182865972638

View File

@ -280,7 +280,7 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Material: {fileID: 0} m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1 m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1 m_Maskable: 1
m_OnCullStateChanged: m_OnCullStateChanged:
@ -502,6 +502,7 @@ GameObject:
- component: {fileID: 323542383032252423} - component: {fileID: 323542383032252423}
- component: {fileID: 6025220162707536696} - component: {fileID: 6025220162707536696}
- component: {fileID: 3617749440597198166} - component: {fileID: 3617749440597198166}
- component: {fileID: 5740481659040249477}
m_Layer: 0 m_Layer: 0
m_Name: ItemPrefab m_Name: ItemPrefab
m_TagString: Untagged m_TagString: Untagged
@ -626,9 +627,23 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
MarkType: 0 MarkType: 0
CustomComponentName: CustomComponentName: ItemPrefab
CustomComment: CustomComment:
mComponentName: UnityEngine.UI.Button mComponentName: UnityEngine.UI.Button
--- !u!114 &5740481659040249477
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1901611519389403572}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 456e447344348cf4680f6e09405e7b79, type: 3}
m_Name:
m_EditorClassIdentifier:
objs:
- {fileID: 5478117157784657024}
--- !u!1 &2685508885550636136 --- !u!1 &2685508885550636136
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -73,7 +73,7 @@ SpriteRenderer:
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0 m_SortingLayerID: 0
m_SortingLayer: 0 m_SortingLayer: 0
m_SortingOrder: 0 m_SortingOrder: 1
m_Sprite: {fileID: 21300000, guid: 700820383005de14fba6008141269066, type: 3} m_Sprite: {fileID: 21300000, guid: 700820383005de14fba6008141269066, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0 m_FlipX: 0

View File

@ -111,10 +111,8 @@ public class ActionHelper
} }
case "UITools": case "UITools":
{ {
var strAction = (XMLTool.StringListAction)act; var strAction = (XMLTool.DictionaryAction)act;
return UIToolsAction.Allocate(strAction.args[0], strAction.args[1], strAction.args[2], strAction.args[3], return UIToolsAction.Allocate(strAction.args);
strAction.args[4], strAction.args[5], strAction.args[6], strAction.args[7],
strAction.args[8], strAction.args[9]);
} }
case "PointQuestion": case "PointQuestion":
return PointQuestionAction.Allocate(act.Value); return PointQuestionAction.Allocate(act.Value);

View File

@ -1,3 +1,4 @@
using DG.Tweening;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
@ -81,13 +82,30 @@ namespace QFramework
{ {
float.TryParse(speed, out curSpeed); float.TryParse(speed, out curSpeed);
} }
anim[animName].speed = curSpeed;
if (curSpeed < 0)
{
anim.Play(animName); anim.Play(animName);
if (anim[animName].wrapMode== WrapMode.Loop) anim[animName].normalizedTime = 1;
DOTween.To(() => anim[animName].normalizedTime, v => anim[animName].normalizedTime = v, 0, anim[animName].length / Math.Abs(curSpeed)).onComplete = () =>
{
anim.Stop();
};
}
else
{
anim[animName].speed = curSpeed;
anim.Play(animName);
if (anim[animName].wrapMode == WrapMode.Loop)
{ {
this.Finish(); this.Finish();
} }
} }
}
} }
catch (Exception) catch (Exception)
{ {

View File

@ -25,6 +25,7 @@ public class TextQuestionAction : IAction
string scoreName = string.Empty; string scoreName = string.Empty;
string absolutely = string.Empty; string absolutely = string.Empty;
string finishedEvent = string.Empty; string finishedEvent = string.Empty;
string optionType = null;
public static TextQuestionAction Allocate(Dictionary<string, string> datas, System.Action onDelayFinish = null) public static TextQuestionAction Allocate(Dictionary<string, string> datas, System.Action onDelayFinish = null)
{ {
var retNode = mPool.Allocate(); var retNode = mPool.Allocate();
@ -42,6 +43,7 @@ public class TextQuestionAction : IAction
retNode.scoreName = datas.ContainsKey("scoreName") ? datas["scoreName"] : string.Empty; retNode.scoreName = datas.ContainsKey("scoreName") ? datas["scoreName"] : string.Empty;
retNode.absolutely = datas.ContainsKey("absolutely") ? datas["absolutely"] : string.Empty; retNode.absolutely = datas.ContainsKey("absolutely") ? datas["absolutely"] : string.Empty;
retNode.finishedEvent = datas.ContainsKey("finishedEvent") ? datas["finishedEvent"] : string.Empty; retNode.finishedEvent = datas.ContainsKey("finishedEvent") ? datas["finishedEvent"] : string.Empty;
retNode.optionType = datas.ContainsKey("optionType") ? datas["optionType"] : "0";
return retNode; return retNode;
} }
@ -84,6 +86,7 @@ public class TextQuestionAction : IAction
float.TryParse(errorScore, out data.errorScore); float.TryParse(errorScore, out data.errorScore);
bool.TryParse(absolutely, out data.absolutely); bool.TryParse(absolutely, out data.absolutely);
} }
int.TryParse(optionType, out data.OptionType);
UIKit.OpenPanelAsync<UITextQuestion>(uiData: data, canvasLevel: UILevel.PopUI).ToAction().StartGlobal(() => this.Finish()); UIKit.OpenPanelAsync<UITextQuestion>(uiData: data, canvasLevel: UILevel.PopUI).ToAction().StartGlobal(() => this.Finish());
} }

View File

@ -14,35 +14,34 @@ public class UIToolsAction : IAction
private static readonly SimpleObjectPool<UIToolsAction> mPool = private static readonly SimpleObjectPool<UIToolsAction> mPool =
new SimpleObjectPool<UIToolsAction>(() => new UIToolsAction(), null, 10); new SimpleObjectPool<UIToolsAction>(() => new UIToolsAction(), null, 10);
string answer = string.Empty; string answer;
string devices = string.Empty; string devices;
string setActive = string.Empty; string setActive;
string rightLabel = string.Empty; string rightLabel;
string wrongLabel = string.Empty; string wrongLabel;
string rightEvent = string.Empty; string rightEvent;
string wrongEvent = string.Empty; string wrongEvent;
string rightScore = string.Empty; string rightScore;
string wrongScore = string.Empty; string wrongScore;
string scoreStepName = string.Empty; string scoreStepName;
public static UIToolsAction Allocate(string devices, string answer, string autoHide;
string setActive, string rightLabel, string wrongLabel, string rightEvent, public static UIToolsAction Allocate(Dictionary<string, string> datas, System.Action onDelayFinish = null)
string wrongEvent,string rightScore, string wrongScore, string scoreStepName,
System.Action onDelayFinish = null)
{ {
var retNode = mPool.Allocate(); var retNode = mPool.Allocate();
retNode.ActionID = ActionKit.ID_GENERATOR++; retNode.ActionID = ActionKit.ID_GENERATOR++;
retNode.Deinited = false; retNode.Deinited = false;
retNode.Reset(); retNode.Reset();
retNode.answer = answer; retNode.answer = datas.ContainsKey("answers") ? datas["answers"] : "";
retNode.devices = devices; retNode.devices = datas.ContainsKey("devices") ? datas["devices"] : "";
retNode.setActive = setActive; retNode.setActive = datas.ContainsKey("setActive") ? datas["setActive"] : "true";
retNode.rightLabel = rightLabel; retNode.rightLabel = datas.ContainsKey("rightLabel") ? datas["rightLabel"] : "";
retNode.wrongLabel = wrongLabel; retNode.wrongLabel = datas.ContainsKey("wrongLabel") ? datas["wrongLabel"] : "";
retNode.rightEvent = rightEvent; retNode.rightEvent = datas.ContainsKey("rightEvent") ? datas["rightEvent"] : "";
retNode.wrongEvent = wrongEvent; retNode.wrongEvent = datas.ContainsKey("wrongEvent") ? datas["wrongEvent"] : "";
retNode.rightScore = rightScore; retNode.rightScore = datas.ContainsKey("rightScore") ? datas["rightScore"] : "";
retNode.wrongScore = wrongScore; retNode.wrongScore = datas.ContainsKey("wrongScore") ? datas["wrongScore"] : "";
retNode.scoreStepName = scoreStepName; retNode.scoreStepName = datas.ContainsKey("scoreStepName") ? datas["scoreStepName"] : "";
retNode.autoHide = datas.ContainsKey("autoHide") ? datas["autoHide"] : "";
return retNode; return retNode;
} }
@ -78,6 +77,10 @@ public class UIToolsAction : IAction
float.TryParse(wrongScore, out data.wrongScore); float.TryParse(wrongScore, out data.wrongScore);
data.scoreStepName = scoreStepName; data.scoreStepName = scoreStepName;
bool.TryParse(setActive, out data.SetActive); bool.TryParse(setActive, out data.SetActive);
if (float.TryParse(autoHide, out data.autoHideResult) == false)
{
data.autoHideResult = -1;
}
UIKit.OpenPanelAsync<UITools>(uiData: data, canvasLevel: UILevel.PopUI).ToAction().StartGlobal(() => this.Finish()); UIKit.OpenPanelAsync<UITools>(uiData: data, canvasLevel: UILevel.PopUI).ToAction().StartGlobal(() => this.Finish());
} }

View File

@ -29,6 +29,11 @@ public class DeviceController : MonoSingleton<DeviceController>
private void OnQuit(OnModuleQuit quit) private void OnQuit(OnModuleQuit quit)
{ {
foreach (var item in deviceDict)
{
item.Value.item?.Close();
item.Value.device = null;
}
deviceDict.Clear(); deviceDict.Clear();
} }

View File

@ -18,7 +18,7 @@ public class DeviceItem : MonoBehaviour
var effect = gameObject.GetOrAddComponent<HighlightEffect>(); var effect = gameObject.GetOrAddComponent<HighlightEffect>();
gameObject.GetOrAddComponent<HighlightTrigger>(); gameObject.GetOrAddComponent<HighlightTrigger>();
effect.outlineColor = Color.green; effect.outlineColor = Color.green;
StringEventSystem.Global.Register<string[]>(Global.HighLightTrigger, OnHighLightTriggerEvent).UnRegisterWhenGameObjectDestroyed(gameObject); StringEventSystem.Global.Register<string[]>(Global.HighLightTrigger, OnHighLightTriggerEvent);
} }
if (device.MeshCollider) if (device.MeshCollider)
{ {
@ -40,6 +40,13 @@ public class DeviceItem : MonoBehaviour
} }
} }
public void Close()
{
device = null;
tipItem = null;
StringEventSystem.Global.UnRegister<string[]>(Global.HighLightTrigger, OnHighLightTriggerEvent);
}
private void OnHighLightTriggerEvent(string[] obj) private void OnHighLightTriggerEvent(string[] obj)
{ {
if (obj.Length > 0) if (obj.Length > 0)

View File

@ -0,0 +1,37 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
public class MouseOverItem : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
{
public List<GameObject> objs;
private void Awake()
{
SetItem(false);
}
public void OnPointerEnter(PointerEventData eventData)
{
SetItem(true);
}
public void OnPointerExit(PointerEventData eventData)
{
SetItem(false);
}
public void SetItem(bool isActive)
{
if (objs != null)
{
foreach (var obj in objs)
{
obj.SetActive(isActive);
}
}
}
}

View File

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

View File

@ -11,6 +11,7 @@ namespace QFramework.Example
{ {
public bool isRight = false; public bool isRight = false;
public string label; public string label;
public float autoHideTime = -1;
public Action callback; public Action callback;
} }
public partial class UIResultTip : UIPanel public partial class UIResultTip : UIPanel
@ -44,15 +45,31 @@ namespace QFramework.Example
} }
obj.SetActive(true); obj.SetActive(true);
obj.transform.Find("Bg/Label").GetComponent<TextMeshProUGUI>().text = mData.label; obj.transform.Find("Bg/Label").GetComponent<TextMeshProUGUI>().text = mData.label;
if (mData.autoHideTime == -1)
{
Button btn = obj.GetComponent<Button>(); Button btn = obj.GetComponent<Button>();
btn.onClick.RemoveAllListeners(); btn.onClick.RemoveAllListeners();
btn.onClick.AddListener(() => btn.onClick.AddListener(() =>
{ {
mData.callback?.Invoke(); SetHide();
Hide();
}); });
} }
else
{
ActionKit.Delay(mData.autoHideTime, () =>
{
SetHide();
}).Start(this);
}
}
public void SetHide()
{
mData.callback?.Invoke();
Hide();
}
protected override void OnShow() protected override void OnShow()
{ {
} }

View File

@ -5,24 +5,32 @@ using QFramework;
namespace QFramework.Example namespace QFramework.Example
{ {
// Generate Id:c0117dd8-dba4-4b88-a9a4-9d2a475f39e4 // Generate Id:b281c961-e874-477e-aab7-2b6e6869f621
public partial class UIRightTop public partial class UIRightTop
{ {
public const string Name = "UIRightTop"; public const string Name = "UIRightTop";
[SerializeField]
public UnityEngine.UI.Button homeIcon;
[SerializeField] [SerializeField]
public UnityEngine.UI.Button homeBtn; public UnityEngine.UI.Button homeBtn;
[SerializeField] [SerializeField]
public RectTransform Score; public RectTransform Score;
[SerializeField] [SerializeField]
public UnityEngine.UI.Button scoreIcon;
[SerializeField]
public UnityEngine.UI.Button scoreBtn; public UnityEngine.UI.Button scoreBtn;
[SerializeField] [SerializeField]
public UnityEngine.UI.Button desIcon;
[SerializeField]
public UnityEngine.UI.Button desBtn; public UnityEngine.UI.Button desBtn;
[SerializeField] [SerializeField]
public RectTransform set; public UnityEngine.UI.Button setIcon;
[SerializeField] [SerializeField]
public UnityEngine.UI.Button setBtn; public UnityEngine.UI.Button setBtn;
[SerializeField] [SerializeField]
public UnityEngine.UI.Button closeIcon;
[SerializeField]
public UnityEngine.UI.Button closeBtn; public UnityEngine.UI.Button closeBtn;
[SerializeField] [SerializeField]
public UnityEngine.UI.Button backBtn; public UnityEngine.UI.Button backBtn;
@ -33,12 +41,16 @@ namespace QFramework.Example
protected override void ClearUIComponents() protected override void ClearUIComponents()
{ {
homeIcon = null;
homeBtn = null; homeBtn = null;
Score = null; Score = null;
scoreIcon = null;
scoreBtn = null; scoreBtn = null;
desIcon = null;
desBtn = null; desBtn = null;
set = null; setIcon = null;
setBtn = null; setBtn = null;
closeIcon = null;
closeBtn = null; closeBtn = null;
backBtn = null; backBtn = null;
Title = null; Title = null;

View File

@ -13,37 +13,81 @@ namespace QFramework.Example
protected override void OnInit(IUIData uiData = null) protected override void OnInit(IUIData uiData = null)
{ {
mData = uiData as UIRightTopData ?? new UIRightTopData(); mData = uiData as UIRightTopData ?? new UIRightTopData();
setBtn.onClick.AddListener(() => setBtn.onClick.AddListener(OnSetClick);
setIcon.onClick.AddListener(OnSetClick);
closeBtn.onClick.AddListener(OnCloseClick);
closeIcon.onClick.AddListener(OnCloseClick);
backBtn.onClick.AddListener(OnBackClick);
homeIcon.onClick.AddListener(OnHomeClick);
homeBtn.onClick.AddListener(OnHomeClick);
desBtn.onClick.AddListener(OnDesClick);
desIcon.onClick.AddListener(OnDesClick);
scoreBtn.onClick.AddListener(OnScoreClick);
scoreIcon.onClick.AddListener(OnScoreClick);
}
public void OnScoreClick()
{
UIKit.OpenPanelAsync<UIScore>(canvasLevel: UILevel.PopUI).ToAction().StartGlobal();
}
public void OnDesClick()
{
UIKit.OpenPanelAsync<UIInstruction>(canvasLevel: UILevel.PopUI).ToAction().StartGlobal();
}
public void OnSetClick()
{ {
UIKit.OpenPanelAsync<UISetting>(canvasLevel: UILevel.PopUI).ToAction().StartGlobal(); UIKit.OpenPanelAsync<UISetting>(canvasLevel: UILevel.PopUI).ToAction().StartGlobal();
}); }
closeBtn.onClick.AddListener(() => public void OnCloseClick()
{ {
UITipWindowData data = new UITipWindowData(); UITipWindowData data = new UITipWindowData();
data.txt = "是否关闭软件?"; data.txt = "是否关闭软件?";
data.btns.Add(new UITipWindowData.ItemData() { txt = "是", OnClick = () => Application.Quit() }); data.btns.Add(new UITipWindowData.ItemData() { txt = "是", OnClick = () => Application.Quit() });
data.btns.Add(new UITipWindowData.ItemData() { txt = "否" }); data.btns.Add(new UITipWindowData.ItemData() { txt = "否" });
UIKit.OpenPanelAsync<UITipWindow>(uiData: data, canvasLevel: UILevel.PopUI).ToAction().StartGlobal(); UIKit.OpenPanelAsync<UITipWindow>(uiData: data, canvasLevel: UILevel.PopUI).ToAction().StartGlobal();
});
backBtn.onClick.AddListener(Home);
homeBtn.onClick.AddListener(Home);
desBtn.onClick.AddListener(() =>
{
UIKit.OpenPanelAsync<UIInstruction>(canvasLevel: UILevel.PopUI).ToAction().StartGlobal();
});
scoreBtn.onClick.AddListener(() =>
{
UIKit.OpenPanelAsync<UIScore>(canvasLevel: UILevel.PopUI).ToAction().StartGlobal();
});
} }
public void OnBackClick()
public void Home() {
int count = 0;
foreach (var item in Global.Instance.appData.Modules)
{
if (item.type == Global.Instance.curModule.type)
{
count++;
}
}
Debug.LogError(count);
if (count > 1)
{ {
UITipWindowData data = new UITipWindowData(); UITipWindowData data = new UITipWindowData();
data.txt = "是否退出当前模块?"; data.txt = "是否退出当前模块?";
data.btns.Add(new UITipWindowData.ItemData() data.btns.Add(new UITipWindowData.ItemData()
{
txt = "ÊÇ",
OnClick = () =>
{
Hide();
TypeEventSystem.Global.Send<OnModuleQuit>();
UIKit.OpenPanelAsync<UIModuleSelect>().ToAction().StartGlobal();
}
});
data.btns.Add(new UITipWindowData.ItemData() { txt = "·ñ" });
UIKit.OpenPanelAsync<UITipWindow>(uiData: data, canvasLevel: UILevel.PopUI).ToAction().StartGlobal();
}
else
{
OnHomeClick();
}
}
public void OnHomeClick()
{
UITipWindowData data = new UITipWindowData();
data.txt = "ÊÇ·ñ·µ»ØÊ×Ò³£¿";
data.btns.Add(new UITipWindowData.ItemData()
{ {
txt = "是", txt = "是",
OnClick = () => OnClick = () =>

View File

@ -24,6 +24,10 @@ namespace QFramework.Example
public string format; public string format;
public string finishedEvent; public string finishedEvent;
/// <summary> /// <summary>
/// 0:×Ô¶¯ÅÐ¶Ï 1:µ¥Ñ¡ 2:¶àÑ¡
/// </summary>
public int OptionType = 0;
/// <summary>
/// 绝对的 不计算分项得分 对就得分 错就不得分 /// 绝对的 不计算分项得分 对就得分 错就不得分
/// </summary> /// </summary>
public bool absolutely = true; public bool absolutely = true;
@ -53,6 +57,23 @@ namespace QFramework.Example
GameObject obj = GameObject.Instantiate(OptionPrefab.gameObject, OptionContent.transform); GameObject obj = GameObject.Instantiate(OptionPrefab.gameObject, OptionContent.transform);
obj.transform.Find("Label").GetComponent<TextMeshProUGUI>().text = item; obj.transform.Find("Label").GetComponent<TextMeshProUGUI>().text = item;
obj.name = (i + 1).ToString(); obj.name = (i + 1).ToString();
bool isGroup = false;
switch (mData.OptionType)
{
case 0:
isGroup = mData.answers.Count == 1;
break;
case 1:
isGroup = true;
break;
case 2:
isGroup = false;
break;
}
if (isGroup)
{
obj.GetComponent<Toggle>().group = OptionContent.GetComponent<ToggleGroup>();
}
} }
BtnContent.RemoveAllChildren(); BtnContent.RemoveAllChildren();

View File

@ -21,6 +21,7 @@ namespace QFramework.Example
public float rightScore; public float rightScore;
public float wrongScore; public float wrongScore;
public string scoreStepName; public string scoreStepName;
public float autoHideResult = -1;
} }
public partial class UITools : UIPanel public partial class UITools : UIPanel
{ {
@ -51,7 +52,7 @@ namespace QFramework.Example
foreach (var device in mData.devices) foreach (var device in mData.devices)
{ {
var item = DeviceController.Instance.GetDevice(device); var item = DeviceController.Instance.GetDevice(device);
if (item==null) if (item == null)
{ {
Debug.LogError(device + ":ûÓÐÕÒµ½¶ÔÓ¦µÄDeviceÅäÖÃ"); Debug.LogError(device + ":ûÓÐÕÒµ½¶ÔÓ¦µÄDeviceÅäÖÃ");
return; return;
@ -65,7 +66,6 @@ namespace QFramework.Example
GameObject right = icon.transform.Find("Right").gameObject; GameObject right = icon.transform.Find("Right").gameObject;
GameObject wrong = icon.transform.Find("Wrong").gameObject; GameObject wrong = icon.transform.Find("Wrong").gameObject;
GameObject Selected = icon.transform.Find("Selected").gameObject; GameObject Selected = icon.transform.Find("Selected").gameObject;
GameObject CurSelect = obj.transform.Find("CurSelect").gameObject;
mResLoader.Add2Load(localImageUrl.ToNetImageResName(), mResLoader.Add2Load(localImageUrl.ToNetImageResName(),
(bool success, IRes res) => (bool success, IRes res) =>
{ {
@ -77,7 +77,6 @@ namespace QFramework.Example
Button btn = obj.GetComponent<Button>(); Button btn = obj.GetComponent<Button>();
btn.onClick.AddListener(() => btn.onClick.AddListener(() =>
{ {
CurSelect.gameObject.SetActive(true);
if (answers != null) if (answers != null)
{ {
if (answers.Contains(item.Name)) if (answers.Contains(item.Name))
@ -98,6 +97,7 @@ namespace QFramework.Example
{ {
StringEventSystem.Global.Send(mData.rightEvent); StringEventSystem.Global.Send(mData.rightEvent);
}; };
data.autoHideTime = mData.autoHideResult;
UIKit.OpenPanelAsync<UIResultTip>(uiData: data, canvasLevel: UILevel.PopUI).ToAction().StartGlobal(); UIKit.OpenPanelAsync<UIResultTip>(uiData: data, canvasLevel: UILevel.PopUI).ToAction().StartGlobal();
} }
} }
@ -112,6 +112,7 @@ namespace QFramework.Example
StringEventSystem.Global.Send(mData.wrongEvent); StringEventSystem.Global.Send(mData.wrongEvent);
SetSelected(obj, false); SetSelected(obj, false);
}; };
data.autoHideTime = mData.autoHideResult;
UIKit.OpenPanelAsync<UIResultTip>(uiData: data, canvasLevel: UILevel.PopUI).ToAction().Start(this); UIKit.OpenPanelAsync<UIResultTip>(uiData: data, canvasLevel: UILevel.PopUI).ToAction().Start(this);
} }
@ -129,8 +130,6 @@ namespace QFramework.Example
GameObject right = icon.Find("Right").gameObject; GameObject right = icon.Find("Right").gameObject;
GameObject wrong = icon.Find("Wrong").gameObject; GameObject wrong = icon.Find("Wrong").gameObject;
GameObject Selected = icon.Find("Selected").gameObject; GameObject Selected = icon.Find("Selected").gameObject;
GameObject CurSelect = item.transform.Find("CurSelect").gameObject;
CurSelect.SetActive(false);
Selected.SetActive(true); Selected.SetActive(true);
if (isRight) if (isRight)
{ {

View File

@ -402,82 +402,54 @@ namespace XMLTool
break; break;
case "UITools": case "UITools":
{ {
var act = new StringListAction(); var act = new DictionaryAction();
act.args.Add(action.Attribute("devices").Value); act.args.Add("devices", action.Attribute("devices").Value);
act.args.Add(action.Attribute("answers").Value); act.args.Add("answers", action.Attribute("answers").Value);
var setActive = action.Attribute("setActive"); var setActive = action.Attribute("setActive");
if (setActive != null) if (setActive != null)
{ {
act.args.Add(setActive.Value); act.args.Add("setActive", setActive.Value);
}
else
{
act.args.Add("true");
} }
var rightLabel = action.Attribute("rightLabel"); var rightLabel = action.Attribute("rightLabel");
if (rightLabel != null) if (rightLabel != null)
{ {
act.args.Add(rightLabel.Value); act.args.Add("rightLabel", rightLabel.Value);
}
else
{
act.args.Add("");
} }
var wrongLabel = action.Attribute("wrongLabel"); var wrongLabel = action.Attribute("wrongLabel");
if (wrongLabel != null) if (wrongLabel != null)
{ {
act.args.Add(wrongLabel.Value); act.args.Add("wrongLabel", wrongLabel.Value);
}
else
{
act.args.Add("");
} }
var rightEvent = action.Attribute("rightEvent"); var rightEvent = action.Attribute("rightEvent");
if (rightEvent != null) if (rightEvent != null)
{ {
act.args.Add(rightEvent.Value); act.args.Add("rightEvent", rightEvent.Value);
}
else
{
act.args.Add("");
} }
var wrongEvent = action.Attribute("wrongEvent"); var wrongEvent = action.Attribute("wrongEvent");
if (wrongEvent != null) if (wrongEvent != null)
{ {
act.args.Add(wrongEvent.Value); act.args.Add("wrongEvent", wrongEvent.Value);
}
else
{
act.args.Add("");
} }
var rightScore = action.Attribute("rightScore"); var rightScore = action.Attribute("rightScore");
if (rightScore != null) if (rightScore != null)
{ {
act.args.Add(rightScore.Value); act.args.Add("rightScore", rightScore.Value);
}
else
{
act.args.Add("");
} }
var wrongScore = action.Attribute("wrongScore"); var wrongScore = action.Attribute("wrongScore");
if (wrongScore != null) if (wrongScore != null)
{ {
act.args.Add(wrongScore.Value); act.args.Add("wrongScore", wrongScore.Value);
}
else
{
act.args.Add("");
} }
var scoreStepName = action.Attribute("scoreStepName"); var scoreStepName = action.Attribute("scoreStepName");
if (scoreStepName != null) if (scoreStepName != null)
{ {
act.args.Add(scoreStepName.Value); act.args.Add("scoreStepName", scoreStepName.Value);
} }
else var autoHide = action.Attribute("autoHide");
if (autoHide != null)
{ {
act.args.Add(""); act.args.Add("autoHide", autoHide.Value);
} }
newAction = act; newAction = act;
} }
break; break;
@ -545,6 +517,11 @@ namespace XMLTool
{ {
act.args.Add("finishedEvent", finishedEvent.Value); act.args.Add("finishedEvent", finishedEvent.Value);
} }
XAttribute optionType = action.Attribute("optionType");
if (optionType != null)
{
act.args.Add("optionType", optionType.Value);
}
newAction = act; newAction = act;
} }
break; break;
@ -1093,7 +1070,7 @@ namespace XMLTool
Point3DQuestion.Data data = new Point3DQuestion.Data(); Point3DQuestion.Data data = new Point3DQuestion.Data();
data.name = item.Attribute("name")?.Value; data.name = item.Attribute("name")?.Value;
XAttribute atr = item.Attribute("deviceName"); XAttribute atr = item.Attribute("deviceName");
if (atr!=null) if (atr != null)
{ {
data.deviceName = item.Attribute("deviceName").Value; data.deviceName = item.Attribute("deviceName").Value;
} }

View File

@ -21,7 +21,9 @@
<Action type="Anim" value="物体路径" deviceName="" animName="动画名字" frame="-1" speed="1"></Action> <Action type="Anim" value="物体路径" deviceName="" animName="动画名字" frame="-1" speed="1"></Action>
<!--右下角生成按钮 可生成多个 用逗号分开--> <!--右下角生成按钮 可生成多个 用逗号分开-->
<Action type="Btns" value="按钮1,按钮2,按钮3"></Action> <Action type="Btns" value="按钮1,按钮2,按钮3"></Action>
<!--用于右侧道具栏选择正确的道具 event用于配合StrEventCondition 做检测 rightScore 正确选择一个 得分 wrongScore 错误一个 得分 scoreStepName是评分的key --> <!--用于右侧道具栏选择正确的道具 event用于配合StrEventCondition 做检测
rightScore 正确选择一个 得分 wrongScore 错误一个 得分 scoreStepName是评分的key
autoHide =-1 则点击结束 否则 等待对应时间后自动结束-->
<Action type="UITools" devices="道具名字1" answers="正确道具" <Action type="UITools" devices="道具名字1" answers="正确道具"
setActive="true" setActive="true"
rightLabel="提示:器械选择正确。" rightLabel="提示:器械选择正确。"
@ -30,7 +32,8 @@
wrongEvent="" wrongEvent=""
rightScore="" rightScore=""
wrongScore="" wrongScore=""
scoreStepName="手术准备器械选择"></Action> scoreStepName="手术准备器械选择"
autoHide="-1"></Action>
<!--物体点位选择 物体的中心点--> <!--物体点位选择 物体的中心点-->
<Action type="PointQuestion" value="路径1,路径2"></Action> <Action type="PointQuestion" value="路径1,路径2"></Action>
@ -58,8 +61,9 @@
format="{0:F1}" F1代表保留1位小数 F2代表2位 F0代表不保留小数 format="{0:F1}" F1代表保留1位小数 F2代表2位 F0代表不保留小数
注意rightScore与wrongScore不能同时存在 同时存在则只生效rightScore 注意rightScore与wrongScore不能同时存在 同时存在则只生效rightScore
finishedEvent 用于监听选择题UI消失 finishedEvent 用于监听选择题UI消失
optionType 0 根据答案数量自动判断单选还是多选 1 单选 2多选
--> -->
<Action type="TextQuestion" title="这里是标题" options="A.111|B.222|C.333|D.4444" answers="2" btns="确定" wait="1" showAnswer="true" scoreName="分数名" rightScore="5" wrongScore="-5" absolutely="false" format="{0:F1}" finishedEvent="事件名"></Action> <Action type="TextQuestion" title="这里是标题" options="A.111|B.222|C.333|D.4444" answers="2" btns="确定" wait="1" showAnswer="true" scoreName="分数名" rightScore="5" wrongScore="-5" absolutely="false" format="{0:F1}" finishedEvent="事件名" optionType="0"></Action>
<!--提示 time为显示的时间 -1则一直显示 icon是前面的绿色图标是否显示 audio是音频 位于data文件夹下的Audio--> <!--提示 time为显示的时间 -1则一直显示 icon是前面的绿色图标是否显示 audio是音频 位于data文件夹下的Audio-->
<Action type="Hint" value="这里是文字描述" time="5" icon="false" audio="音频.mp3"></Action> <Action type="Hint" value="这里是文字描述" time="5" icon="false" audio="音频.mp3"></Action>
<!--设置变量 value只能是数字可以是小数--> <!--设置变量 value只能是数字可以是小数-->