PC点击区域&PFbutton微调
This commit is contained in:
parent
5340d3d58b
commit
37873427e3
@ -30,7 +30,7 @@ RectTransform:
|
|||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 189965521107699628}
|
m_Father: {fileID: 189965521107699628}
|
||||||
m_RootOrder: 1
|
m_RootOrder: 2
|
||||||
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: 0, y: 0.5}
|
||||||
m_AnchorMax: {x: 1, y: 0.5}
|
m_AnchorMax: {x: 1, y: 0.5}
|
||||||
@ -74,6 +74,80 @@ MonoBehaviour:
|
|||||||
m_FillOrigin: 0
|
m_FillOrigin: 0
|
||||||
m_UseSpriteMesh: 0
|
m_UseSpriteMesh: 0
|
||||||
m_PixelsPerUnitMultiplier: 1
|
m_PixelsPerUnitMultiplier: 1
|
||||||
|
--- !u!1 &5083574894189849385
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 2937272512562187578}
|
||||||
|
- component: {fileID: 721626668066490155}
|
||||||
|
- component: {fileID: 2932644569775562883}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Panel
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &2937272512562187578
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5083574894189849385}
|
||||||
|
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: 189965521107699628}
|
||||||
|
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 &721626668066490155
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5083574894189849385}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &2932644569775562883
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5083574894189849385}
|
||||||
|
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_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_Type: 1
|
||||||
|
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 &5362620512280803541
|
--- !u!1 &5362620512280803541
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -102,6 +176,7 @@ RectTransform:
|
|||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children:
|
m_Children:
|
||||||
|
- {fileID: 2937272512562187578}
|
||||||
- {fileID: 4347642619387382541}
|
- {fileID: 4347642619387382541}
|
||||||
- {fileID: 5333104648953487716}
|
- {fileID: 5333104648953487716}
|
||||||
- {fileID: 6514089965287851756}
|
- {fileID: 6514089965287851756}
|
||||||
@ -153,7 +228,7 @@ MonoBehaviour:
|
|||||||
m_SelectedTrigger: Selected
|
m_SelectedTrigger: Selected
|
||||||
m_DisabledTrigger: Disabled
|
m_DisabledTrigger: Disabled
|
||||||
m_Interactable: 1
|
m_Interactable: 1
|
||||||
m_TargetGraphic: {fileID: 0}
|
m_TargetGraphic: {fileID: 2932644569775562883}
|
||||||
--- !u!1 &6092777681612193971
|
--- !u!1 &6092777681612193971
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -184,7 +259,7 @@ RectTransform:
|
|||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 189965521107699628}
|
m_Father: {fileID: 189965521107699628}
|
||||||
m_RootOrder: 2
|
m_RootOrder: 3
|
||||||
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: 0, y: 0.5}
|
||||||
m_AnchorMax: {x: 0, y: 0.5}
|
m_AnchorMax: {x: 0, y: 0.5}
|
||||||
@ -259,7 +334,7 @@ RectTransform:
|
|||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 189965521107699628}
|
m_Father: {fileID: 189965521107699628}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 1
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0, y: 1}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0, y: 1}
|
||||||
@ -350,7 +425,7 @@ RectTransform:
|
|||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 189965521107699628}
|
m_Father: {fileID: 189965521107699628}
|
||||||
m_RootOrder: 3
|
m_RootOrder: 4
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 1, y: 0.5}
|
m_AnchorMin: {x: 1, y: 0.5}
|
||||||
m_AnchorMax: {x: 1, y: 0.5}
|
m_AnchorMax: {x: 1, y: 0.5}
|
||||||
|
|||||||
@ -136,7 +136,7 @@ namespace Assets.Scripts.UI.Control
|
|||||||
{
|
{
|
||||||
Debug.Log(131);
|
Debug.Log(131);
|
||||||
timer.Stop();
|
timer.Stop();
|
||||||
|
group.DOFade(1, 1f);
|
||||||
};
|
};
|
||||||
|
|
||||||
//鼠标进入
|
//鼠标进入
|
||||||
@ -151,26 +151,28 @@ namespace Assets.Scripts.UI.Control
|
|||||||
if (!string.IsNullOrWhiteSpace(Tooltips) && showTooltip)
|
if (!string.IsNullOrWhiteSpace(Tooltips) && showTooltip)
|
||||||
{
|
{
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//tooltips.SetActive(true);
|
//tooltips.SetActive(true);
|
||||||
//tooltips.GetComponent<CanvasGroup>().DOFade(1, 0.5f);
|
//tooltips.GetComponent<CanvasGroup>().DOFade(1, 0.5f);
|
||||||
|
|
||||||
|
|
||||||
//tooltips.GetComponent<CanvasGroup>().DOFade(1, 0.5f);
|
//tooltips.GetComponent<CanvasGroup>().DOFade(1, 0.5f);
|
||||||
//DOTween.CompleteAll(true);
|
//DOTween.CompleteAll(true);
|
||||||
se = DOTween.Sequence();
|
//se = DOTween.Sequence();
|
||||||
se.SetDelay(1);
|
//se.SetDelay(1);
|
||||||
se.AppendCallback(() =>
|
//se.AppendCallback(() =>
|
||||||
{
|
//{
|
||||||
if(a!=null) a.Complete(true);
|
// if(a!=null) a.Complete(true);
|
||||||
if (b != null) b.Complete(true);
|
// if (b != null) b.Complete(true);
|
||||||
tooltips.SetActive(true);
|
// tooltips.SetActive(true);
|
||||||
tooltips.GetComponent<CanvasGroup>().alpha = 0f;
|
// tooltips.GetComponent<CanvasGroup>().alpha = 0f;
|
||||||
c = tooltips.GetComponent<CanvasGroup>().DOFade(1, 0.5f);
|
// c = tooltips.GetComponent<CanvasGroup>().DOFade(1, 0.5f);
|
||||||
});
|
//});
|
||||||
a = se.Play();
|
//a = se.Play();
|
||||||
|
tooltips.SetActive(true);
|
||||||
|
tooltips.GetComponent<CanvasGroup>().alpha = 0f;
|
||||||
//StartCoroutine(DelayShowTooltip());
|
//StartCoroutine(DelayShowTooltip());
|
||||||
//timer.Start();
|
timer.Start();
|
||||||
}
|
}
|
||||||
switch (mType)
|
switch (mType)
|
||||||
{
|
{
|
||||||
@ -207,10 +209,7 @@ namespace Assets.Scripts.UI.Control
|
|||||||
if (!string.IsNullOrWhiteSpace(Tooltips) && showTooltip)
|
if (!string.IsNullOrWhiteSpace(Tooltips) && showTooltip)
|
||||||
{
|
{
|
||||||
#endif
|
#endif
|
||||||
if (a != null) a.Complete(true);
|
group.DOFade(0, 1f).onComplete += () => {
|
||||||
if (c != null) c.Complete(true);
|
|
||||||
b = group.DOFade(0, 1f);
|
|
||||||
b.onComplete += () => {
|
|
||||||
tooltips.SetActive(false);
|
tooltips.SetActive(false);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -242,9 +241,9 @@ namespace Assets.Scripts.UI.Control
|
|||||||
UIManager.AddEvent(this.gameObject, EventTriggerType.PointerDown, new UnityEngine.Events.UnityAction<BaseEventData>(e =>
|
UIManager.AddEvent(this.gameObject, EventTriggerType.PointerDown, new UnityEngine.Events.UnityAction<BaseEventData>(e =>
|
||||||
{
|
{
|
||||||
if (!this.isActiveAndEnabled) return;
|
if (!this.isActiveAndEnabled) return;
|
||||||
if (a != null) a.Complete(true);
|
//if (a != null) a.Complete(true);
|
||||||
if (b != null) b.Complete(true);
|
//if (b != null) b.Complete(true);
|
||||||
if (c != null) c.Complete(true);
|
//if (c != null) c.Complete(true);
|
||||||
tooltips.SetActive(false);
|
tooltips.SetActive(false);
|
||||||
|
|
||||||
//else
|
//else
|
||||||
@ -273,6 +272,11 @@ namespace Assets.Scripts.UI.Control
|
|||||||
image.color = ConvertColor("#BD2255");
|
image.color = ConvertColor("#BD2255");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case Type.Image:
|
||||||
|
{
|
||||||
|
tooltips.SetActive(tooltips.activeSelf);
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -304,7 +308,7 @@ namespace Assets.Scripts.UI.Control
|
|||||||
break;
|
break;
|
||||||
case Type.Image:
|
case Type.Image:
|
||||||
{
|
{
|
||||||
//tooltips.SetActive(false);
|
tooltips.SetActive(false);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user