Compare commits
No commits in common. "faceaae3a8c64adae7858d6fde12fcc4c9cf32e9" and "ba7656b00180cae9d89348d1bf37f0dc404c2a21" have entirely different histories.
faceaae3a8
...
ba7656b001
@ -51,7 +51,6 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
answers: []
|
answers: []
|
||||||
bg: {fileID: 2575765536656914917}
|
|
||||||
Scroll: {fileID: 3666318679728618663}
|
Scroll: {fileID: 3666318679728618663}
|
||||||
Content: {fileID: 8229723427790603414}
|
Content: {fileID: 8229723427790603414}
|
||||||
ItemPrefab: {fileID: 3266964766418377106}
|
ItemPrefab: {fileID: 3266964766418377106}
|
||||||
@ -870,7 +869,6 @@ GameObject:
|
|||||||
- component: {fileID: 4604846658045866225}
|
- component: {fileID: 4604846658045866225}
|
||||||
- component: {fileID: 7995524027316056123}
|
- component: {fileID: 7995524027316056123}
|
||||||
- component: {fileID: 2575765536656914917}
|
- component: {fileID: 2575765536656914917}
|
||||||
- component: {fileID: 7995406576721174090}
|
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: bg
|
m_Name: bg
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@ -893,9 +891,9 @@ RectTransform:
|
|||||||
- {fileID: 9189599814967438796}
|
- {fileID: 9189599814967438796}
|
||||||
m_Father: {fileID: 4477385101412774245}
|
m_Father: {fileID: 4477385101412774245}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0.5}
|
m_AnchorMin: {x: 1, y: 0.5}
|
||||||
m_AnchorMax: {x: 0, y: 0.5}
|
m_AnchorMax: {x: 1, y: 0.5}
|
||||||
m_AnchoredPosition: {x: 111.5, y: 0}
|
m_AnchoredPosition: {x: -133, y: 0}
|
||||||
m_SizeDelta: {x: 223, y: 653}
|
m_SizeDelta: {x: 223, y: 653}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &7995524027316056123
|
--- !u!222 &7995524027316056123
|
||||||
@ -936,22 +934,6 @@ MonoBehaviour:
|
|||||||
m_FillOrigin: 0
|
m_FillOrigin: 0
|
||||||
m_UseSpriteMesh: 0
|
m_UseSpriteMesh: 0
|
||||||
m_PixelsPerUnitMultiplier: 1
|
m_PixelsPerUnitMultiplier: 1
|
||||||
--- !u!114 &7995406576721174090
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3256755621147846471}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 0d51f3a7c41ab0346b49ae50d456bece, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
MarkType: 0
|
|
||||||
CustomComponentName: bg
|
|
||||||
CustomComment:
|
|
||||||
mComponentName: UnityEngine.UI.Image
|
|
||||||
--- !u!1 &3509989120642977392
|
--- !u!1 &3509989120642977392
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
@ -28,7 +28,6 @@ public class UIToolsAction : IAction
|
|||||||
string autoHide;
|
string autoHide;
|
||||||
string random;
|
string random;
|
||||||
string scrollSpeed;
|
string scrollSpeed;
|
||||||
string position;
|
|
||||||
public static UIToolsAction Allocate(Dictionary<string, string> datas, System.Action onDelayFinish = null)
|
public static UIToolsAction Allocate(Dictionary<string, string> datas, System.Action onDelayFinish = null)
|
||||||
{
|
{
|
||||||
var retNode = mPool.Allocate();
|
var retNode = mPool.Allocate();
|
||||||
@ -49,7 +48,6 @@ public class UIToolsAction : IAction
|
|||||||
retNode.autoHide = datas.ContainsKey("autoHide") ? datas["autoHide"] : "";
|
retNode.autoHide = datas.ContainsKey("autoHide") ? datas["autoHide"] : "";
|
||||||
retNode.random = datas.ContainsKey("random") ? datas["random"] : "";
|
retNode.random = datas.ContainsKey("random") ? datas["random"] : "";
|
||||||
retNode.scrollSpeed = datas.ContainsKey("scrollSpeed") ? datas["scrollSpeed"] : "";
|
retNode.scrollSpeed = datas.ContainsKey("scrollSpeed") ? datas["scrollSpeed"] : "";
|
||||||
retNode.position = datas.ContainsKey("position") ? datas["position"] : "";
|
|
||||||
return retNode;
|
return retNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,7 +97,6 @@ public class UIToolsAction : IAction
|
|||||||
{
|
{
|
||||||
data.autoHideResult = -1;
|
data.autoHideResult = -1;
|
||||||
}
|
}
|
||||||
data.position = position;
|
|
||||||
UIKit.OpenPanelAsync<UITools>(uiData: data, canvasLevel: UILevel.PopUI).ToAction().StartGlobal(() => this.Finish());
|
UIKit.OpenPanelAsync<UITools>(uiData: data, canvasLevel: UILevel.PopUI).ToAction().StartGlobal(() => this.Finish());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
5
Assets/Scripts/UI/UITools.Designer.cs
generated
5
Assets/Scripts/UI/UITools.Designer.cs
generated
@ -5,13 +5,11 @@ using QFramework;
|
|||||||
|
|
||||||
namespace QFramework.Example
|
namespace QFramework.Example
|
||||||
{
|
{
|
||||||
// Generate Id:be7133cf-6b67-4ebc-b151-f39cadcba0d2
|
// Generate Id:5f777d12-69d4-455d-bef6-fb39dbeda60e
|
||||||
public partial class UITools
|
public partial class UITools
|
||||||
{
|
{
|
||||||
public const string Name = "UITools";
|
public const string Name = "UITools";
|
||||||
|
|
||||||
[SerializeField]
|
|
||||||
public UnityEngine.UI.Image bg;
|
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
public UnityEngine.UI.ScrollRect Scroll;
|
public UnityEngine.UI.ScrollRect Scroll;
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
@ -23,7 +21,6 @@ namespace QFramework.Example
|
|||||||
|
|
||||||
protected override void ClearUIComponents()
|
protected override void ClearUIComponents()
|
||||||
{
|
{
|
||||||
bg = null;
|
|
||||||
Scroll = null;
|
Scroll = null;
|
||||||
Content = null;
|
Content = null;
|
||||||
ItemPrefab = null;
|
ItemPrefab = null;
|
||||||
|
|||||||
@ -25,7 +25,6 @@ namespace QFramework.Example
|
|||||||
public float autoHideResult = -1;
|
public float autoHideResult = -1;
|
||||||
public bool random = false;
|
public bool random = false;
|
||||||
public float scrollSpeed = 25;
|
public float scrollSpeed = 25;
|
||||||
public string position;
|
|
||||||
}
|
}
|
||||||
public partial class UITools : UIPanel
|
public partial class UITools : UIPanel
|
||||||
{
|
{
|
||||||
@ -141,35 +140,6 @@ namespace QFramework.Example
|
|||||||
}
|
}
|
||||||
mResLoader.LoadAsync();
|
mResLoader.LoadAsync();
|
||||||
Scroll.verticalNormalizedPosition = 1;
|
Scroll.verticalNormalizedPosition = 1;
|
||||||
|
|
||||||
|
|
||||||
switch (mData.position)
|
|
||||||
{
|
|
||||||
case "left":
|
|
||||||
// 将锚点设为父容器的右侧中间(Middle-Right)
|
|
||||||
bg.rectTransform.anchorMin = new Vector2(0, 0.5f); // 左下锚点(右侧)
|
|
||||||
bg.rectTransform.anchorMax = new Vector2(0, 0.5f); // 右上锚点(右侧)
|
|
||||||
|
|
||||||
// 将位置偏移归零(相对于锚点)
|
|
||||||
bg.rectTransform.anchoredPosition = Vector2.zero;
|
|
||||||
|
|
||||||
// 可选:设置轴心点为右侧中点(影响缩放/旋转中心)
|
|
||||||
bg.rectTransform.pivot = new Vector2(0, 0.5f);
|
|
||||||
break;
|
|
||||||
case "right":
|
|
||||||
default:
|
|
||||||
// 将锚点设为父容器的右侧中间(Middle-Right)
|
|
||||||
bg.rectTransform.anchorMin = new Vector2(1, 0.5f); // 左下锚点(右侧)
|
|
||||||
bg.rectTransform.anchorMax = new Vector2(1, 0.5f); // 右上锚点(右侧)
|
|
||||||
|
|
||||||
// 将位置偏移归零(相对于锚点)
|
|
||||||
bg.rectTransform.anchoredPosition = Vector2.zero;
|
|
||||||
|
|
||||||
// 可选:设置轴心点为右侧中点(影响缩放/旋转中心)
|
|
||||||
bg.rectTransform.pivot = new Vector2(1, 0.5f);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetSelected(GameObject item, bool isRight)
|
public void SetSelected(GameObject item, bool isRight)
|
||||||
|
|||||||
@ -580,11 +580,6 @@ namespace XMLTool
|
|||||||
{
|
{
|
||||||
act.args.Add("scrollSpeed", scrollSpeed.Value);
|
act.args.Add("scrollSpeed", scrollSpeed.Value);
|
||||||
}
|
}
|
||||||
var position = action.Attribute("position");
|
|
||||||
if (position != null)
|
|
||||||
{
|
|
||||||
act.args.Add("position", position.Value);
|
|
||||||
}
|
|
||||||
newAction = act;
|
newAction = act;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -31,8 +31,7 @@
|
|||||||
autoHide =-1 则点击结束 否则 等待对应时间后自动结束
|
autoHide =-1 则点击结束 否则 等待对应时间后自动结束
|
||||||
totalScore 是配合wrongScore的用于初始化一个分数 然后选择扣分
|
totalScore 是配合wrongScore的用于初始化一个分数 然后选择扣分
|
||||||
random 是否打乱devices的顺序
|
random 是否打乱devices的顺序
|
||||||
scrollSpeed 鼠标滚轮的滑动速度
|
scrollSpeed 鼠标滚轮的滑动速度-->
|
||||||
position left/right 可以让道具栏在左侧或者右侧-->
|
|
||||||
<Action type="UITools" devices="道具名字1" answers="正确道具"
|
<Action type="UITools" devices="道具名字1" answers="正确道具"
|
||||||
setActive="true"
|
setActive="true"
|
||||||
rightLabel="提示:器械选择正确。"
|
rightLabel="提示:器械选择正确。"
|
||||||
@ -45,8 +44,7 @@
|
|||||||
scoreStepName="手术准备器械选择"
|
scoreStepName="手术准备器械选择"
|
||||||
autoHide="-1"
|
autoHide="-1"
|
||||||
random="true"
|
random="true"
|
||||||
scrollSpeed="25"
|
scrollSpeed="25"></Action>
|
||||||
position="right"></Action>
|
|
||||||
|
|
||||||
<!--物体点位选择 物体的中心点-->
|
<!--物体点位选择 物体的中心点-->
|
||||||
<Action type="PointQuestion" value="路径1,路径2"></Action>
|
<Action type="PointQuestion" value="路径1,路径2"></Action>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user