Extra tooltip exit collider
This commit is contained in:
parent
323b0ef4c4
commit
0f3cfcc364
|
@ -934,6 +934,7 @@ MonoBehaviour:
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
tooltip: {fileID: 7959461870474528235}
|
tooltip: {fileID: 7959461870474528235}
|
||||||
|
ExtraExitCollider: {fileID: 3164206115851743815}
|
||||||
ButtonIndex: -1
|
ButtonIndex: -1
|
||||||
--- !u!1 &1444386719009988973
|
--- !u!1 &1444386719009988973
|
||||||
GameObject:
|
GameObject:
|
||||||
|
@ -1667,6 +1668,7 @@ MonoBehaviour:
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
tooltip: {fileID: 8584771696634545955}
|
tooltip: {fileID: 8584771696634545955}
|
||||||
|
ExtraExitCollider: {fileID: 3164206115851743815}
|
||||||
ButtonIndex: -1
|
ButtonIndex: -1
|
||||||
--- !u!1 &3452371300238378862
|
--- !u!1 &3452371300238378862
|
||||||
GameObject:
|
GameObject:
|
||||||
|
@ -3072,6 +3074,7 @@ MonoBehaviour:
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
tooltip: {fileID: 2899067781696711495}
|
tooltip: {fileID: 2899067781696711495}
|
||||||
|
ExtraExitCollider: {fileID: 3164206115851743815}
|
||||||
ButtonIndex: -1
|
ButtonIndex: -1
|
||||||
--- !u!1 &5621856367784821633
|
--- !u!1 &5621856367784821633
|
||||||
GameObject:
|
GameObject:
|
||||||
|
@ -3950,6 +3953,7 @@ MonoBehaviour:
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
tooltip: {fileID: 4502190811754076786}
|
tooltip: {fileID: 4502190811754076786}
|
||||||
|
ExtraExitCollider: {fileID: 3164206115851743815}
|
||||||
ButtonIndex: -1
|
ButtonIndex: -1
|
||||||
--- !u!1 &8438906130455969465
|
--- !u!1 &8438906130455969465
|
||||||
GameObject:
|
GameObject:
|
||||||
|
@ -4546,6 +4550,7 @@ MonoBehaviour:
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
tooltip: {fileID: 1475988817490299594}
|
tooltip: {fileID: 1475988817490299594}
|
||||||
|
ExtraExitCollider: {fileID: 3164206115851743815}
|
||||||
ButtonIndex: -1
|
ButtonIndex: -1
|
||||||
--- !u!1001 &1148800059794808287
|
--- !u!1001 &1148800059794808287
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
|
|
|
@ -10,6 +10,7 @@ public class UITooltips : MonoBehaviour
|
||||||
// Not optimal but gamejam momento
|
// Not optimal but gamejam momento
|
||||||
|
|
||||||
[SerializeField] private GameObject tooltip;
|
[SerializeField] private GameObject tooltip;
|
||||||
|
[SerializeField] private EventTrigger ExtraExitCollider;
|
||||||
private EventTrigger uiEvents;
|
private EventTrigger uiEvents;
|
||||||
|
|
||||||
public int ButtonIndex = -1;
|
public int ButtonIndex = -1;
|
||||||
|
@ -29,6 +30,12 @@ public class UITooltips : MonoBehaviour
|
||||||
pointerEnter.callback.AddListener((data) => { OnEnter((PointerEventData)data); });
|
pointerEnter.callback.AddListener((data) => { OnEnter((PointerEventData)data); });
|
||||||
uiEvents.triggers.Add(pointerEnter);
|
uiEvents.triggers.Add(pointerEnter);
|
||||||
|
|
||||||
|
// Subscribe to PointerEnter event
|
||||||
|
EventTrigger.Entry ExtraExitEnter = new EventTrigger.Entry();
|
||||||
|
ExtraExitEnter.eventID = EventTriggerType.PointerEnter;
|
||||||
|
ExtraExitEnter.callback.AddListener((data) => { OnExit((PointerEventData)data); });
|
||||||
|
ExtraExitCollider.triggers.Add(ExtraExitEnter);
|
||||||
|
|
||||||
// Subscribe to PointerExit event
|
// Subscribe to PointerExit event
|
||||||
EventTrigger.Entry pointerExit = new EventTrigger.Entry();
|
EventTrigger.Entry pointerExit = new EventTrigger.Entry();
|
||||||
pointerExit.eventID = EventTriggerType.PointerExit;
|
pointerExit.eventID = EventTriggerType.PointerExit;
|
||||||
|
|
Loading…
Reference in New Issue