net.dreditor.uihandling 0.1.6 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.attestation.p7m +0 -0
- package/AnimatorBoolUIVisibility.cs +128 -128
- package/AnimatorBoolUIVisibility.cs.meta +11 -11
- package/AnimatorUIVisibility.cs +101 -101
- package/AnimatorUIVisibility.cs.meta +11 -11
- package/CanvasUIVisibility.cs +102 -102
- package/CanvasUIVisibility.cs.meta +11 -11
- package/CenterReticleOnSafeState.cs +19 -19
- package/CenterReticleOnSafeState.cs.meta +11 -11
- package/ColorUIVisibility.cs +133 -133
- package/ColorUIVisibility.cs.meta +1 -1
- package/ConditionOnSceneEvent.cs +42 -42
- package/ConditionOnSceneEvent.cs.meta +11 -11
- package/ConditionVisibilityEntry.cs +32 -32
- package/ConditionVisibilityEntry.cs.meta +1 -1
- package/DREditor.UIHandling.asmdef +20 -20
- package/DREditor.UIHandling.asmdef.meta +7 -7
- package/DialogueUIComponent.cs +80 -80
- package/DialogueUIComponent.cs.meta +11 -11
- package/EvaluateBoolCondition.cs +76 -76
- package/EvaluateBoolCondition.cs.meta +11 -11
- package/EvaluateCondition.cs +77 -77
- package/EvaluateCondition.cs.meta +11 -11
- package/EvaluateContextCondition.cs +43 -43
- package/EvaluateContextCondition.cs.meta +1 -1
- package/FadeCanvasGroupVisibility.cs +10 -10
- package/FadeCanvasGroupVisibility.cs.meta +11 -11
- package/FadeGraphicVisibility.cs +10 -10
- package/FadeGraphicVisibility.cs.meta +11 -11
- package/FadeHelper.cs +50 -50
- package/FadeHelper.cs.meta +11 -11
- package/FadeVisibility.cs +165 -165
- package/FadeVisibility.cs.meta +11 -11
- package/GlobalFadeUIVisibility.cs +43 -43
- package/GlobalFadeUIVisibility.cs.meta +11 -11
- package/HideDialogueUIHandler.cs +54 -54
- package/HideDialogueUIHandler.cs.meta +11 -11
- package/IModeVisibilityEntry.cs +21 -21
- package/IModeVisibilityEntry.cs.meta +1 -1
- package/ITrackableVisibility.cs +13 -13
- package/ITrackableVisibility.cs.meta +1 -1
- package/IUIVisibility.cs +25 -25
- package/IUIVisibility.cs.meta +11 -11
- package/IWaitAnimationCompleteOnLoad.cs +15 -15
- package/IWaitAnimationCompleteOnLoad.cs.meta +11 -11
- package/InSafeStateCondition.cs +58 -58
- package/InSafeStateCondition.cs.meta +11 -11
- package/LetterBoxCanvasHolder.cs +51 -51
- package/LetterBoxCanvasHolder.cs.meta +11 -11
- package/MatchBoolEventState.cs +42 -42
- package/MatchBoolEventState.cs.meta +11 -11
- package/MoveUIVisibility.cs +20 -20
- package/MoveUIVisibility.cs.meta +11 -11
- package/MultiUIVisibility.cs +128 -128
- package/MultiUIVisibility.cs.meta +11 -11
- package/OnModeVisibilityHandler.cs +39 -39
- package/OnModeVisibilityHandler.cs.meta +11 -11
- package/ProtagUIWindow.cs +99 -99
- package/ProtagUIWindow.cs.meta +11 -11
- package/Reticles/HoverReticle.cs +131 -131
- package/Reticles/HoverReticle.cs.meta +11 -11
- package/Reticles/ObjectNameOnReticle.cs +65 -65
- package/Reticles/ObjectNameOnReticle.cs.meta +11 -11
- package/Reticles/RaycastReticle.cs +263 -263
- package/Reticles/RaycastReticle.cs.meta +11 -11
- package/Reticles/Reticle.cs +196 -196
- package/Reticles/Reticle.cs.meta +11 -11
- package/Reticles/ReticleAnimationComponent.cs +143 -143
- package/Reticles/ReticleAnimationComponent.cs.meta +11 -11
- package/Reticles/ReticleComponent.cs +34 -34
- package/Reticles/ReticleComponent.cs.meta +11 -11
- package/Reticles/ReticleIconLayer.cs +26 -26
- package/Reticles/ReticleIconLayer.cs.meta +11 -11
- package/Reticles.meta +8 -8
- package/RotateUIVisibility.cs +28 -28
- package/RotateUIVisibility.cs.meta +1 -1
- package/{Samples → Samples~}/3DUIVisible.asset +21 -21
- package/{Samples → Samples~}/3DUIVisible.asset.meta +8 -8
- package/{Samples → Samples~}/Allow_Raycasting.prefab +64 -64
- package/{Samples → Samples~}/Allow_Raycasting.prefab.meta +7 -7
- package/{Samples → Samples~}/Dialogue_Load_Leave_Condition.prefab +61 -61
- package/{Samples → Samples~}/Dialogue_Load_Leave_Condition.prefab.meta +7 -7
- package/{Samples → Samples~}/Disable_On_FTE_Minigame.prefab +132 -132
- package/{Samples → Samples~}/Disable_On_FTE_Minigame.prefab.meta +7 -7
- package/{Samples → Samples~}/Enable_When_In_Leave_Process.prefab +142 -142
- package/{Samples → Samples~}/Enable_When_In_Leave_Process.prefab.meta +7 -7
- package/{Samples → Samples~}/FreezeUIVisible.asset +20 -20
- package/{Samples → Samples~}/FreezeUIVisible.asset.meta +8 -8
- package/{Samples → Samples~}/Freeze_UI_System.prefab +331 -331
- package/{Samples → Samples~}/Freeze_UI_System.prefab.meta +7 -7
- package/{Samples → Samples~}/Global_Fade_UI_Visibility.prefab +48 -48
- package/{Samples → Samples~}/Global_Fade_UI_Visibility.prefab.meta +7 -7
- package/{Samples → Samples~}/Hide_Dialogue_UI_Handler.prefab +139 -139
- package/{Samples → Samples~}/Hide_Dialogue_UI_Handler.prefab.meta +7 -7
- package/{Samples → Samples~}/Hide_Dialogue_UI_Handler_Shell.prefab +81 -81
- package/{Samples → Samples~}/Hide_Dialogue_UI_Handler_Shell.prefab.meta +7 -7
- package/{Samples → Samples~}/Hide_Instant_Dialogue_UI_Handler.prefab +86 -86
- package/{Samples → Samples~}/Hide_Instant_Dialogue_UI_Handler.prefab.meta +7 -7
- package/{Samples → Samples~}/In_Safe_State_Condition.prefab +56 -56
- package/{Samples → Samples~}/In_Safe_State_Condition.prefab.meta +7 -7
- package/{Samples → Samples~}/In_Safe_TPFD_State.prefab +59 -59
- package/{Samples → Samples~}/In_Safe_TPFD_State.prefab.meta +7 -7
- package/{Samples → Samples~}/OnFinishedRoomTransitions.asset +14 -14
- package/{Samples → Samples~}/OnFinishedRoomTransitions.asset.meta +8 -8
- package/{Samples → Samples~}/PlayHideDialogueSFX.asset +21 -21
- package/{Samples → Samples~}/PlayHideDialogueSFX.asset.meta +8 -8
- package/{Samples → Samples~}/PostPhaseChange.asset +14 -14
- package/{Samples → Samples~}/PostPhaseChange.asset.meta +8 -8
- package/{Samples → Samples~}/Post_Phase_Change_Listener.prefab +51 -51
- package/{Samples → Samples~}/Post_Phase_Change_Listener.prefab.meta +7 -7
- package/{Samples → Samples~}/PrePhaseChange.asset +14 -14
- package/{Samples → Samples~}/PrePhaseChange.asset.meta +8 -8
- package/{Samples → Samples~}/PrePhaseDialogueEnd.asset +14 -14
- package/{Samples → Samples~}/PrePhaseDialogueEnd.asset.meta +8 -8
- package/{Samples → Samples~}/Pre_Phase_Change_Listener.prefab +51 -51
- package/{Samples → Samples~}/Pre_Phase_Change_Listener.prefab.meta +7 -7
- package/{Samples → Samples~}/Pre_Phase_Dialogue_End_Listener.prefab +51 -51
- package/{Samples → Samples~}/Pre_Phase_Dialogue_End_Listener.prefab.meta +7 -7
- package/{Samples → Samples~}/ProtagUIVisible.asset +20 -20
- package/{Samples → Samples~}/ProtagUIVisible.asset.meta +8 -8
- package/{Samples → Samples~}/Show_Dialogue_UI_Handler.prefab +106 -106
- package/{Samples → Samples~}/Show_Dialogue_UI_Handler.prefab.meta +7 -7
- package/{Samples → Samples~}/Show_Dialogue_UI_Handler_Shell.prefab +87 -87
- package/{Samples → Samples~}/Show_Dialogue_UI_Handler_Shell.prefab.meta +7 -7
- package/{Samples → Samples~}/Show_Instant_Dialogue_UI_Handler.prefab +85 -85
- package/{Samples → Samples~}/Show_Instant_Dialogue_UI_Handler.prefab.meta +7 -7
- package/{Samples → Samples~}/Show_Reticle_On_Dialogue_Finish.prefab +98 -98
- package/{Samples → Samples~}/Show_Reticle_On_Dialogue_Finish.prefab.meta +7 -7
- package/{Samples → Samples~}/Show_Trial_Dialogue_UI_Handler.prefab +91 -91
- package/{Samples → Samples~}/Show_Trial_Dialogue_UI_Handler.prefab.meta +7 -7
- package/{Samples → Samples~}/Stop_Reticle_Confirm_Select_On_Dialogue_Finish.prefab +108 -108
- package/{Samples → Samples~}/Stop_Reticle_Confirm_Select_On_Dialogue_Finish.prefab.meta +7 -7
- package/{Samples → Samples~}/Toggle_Bool_With_Event.prefab +47 -47
- package/{Samples → Samples~}/Toggle_Bool_With_Event.prefab.meta +7 -7
- package/{Samples → Samples~}/Toggle_Protag_UI_On_Scene_Event.prefab +124 -124
- package/{Samples → Samples~}/Toggle_Protag_UI_On_Scene_Event.prefab.meta +7 -7
- package/{Samples → Samples~}/UIVisibility_On_Dialogue_Finish.prefab +51 -51
- package/{Samples → Samples~}/UIVisibility_On_Dialogue_Finish.prefab.meta +7 -7
- package/{Samples → Samples~}/UI_Visibility_By_Dialogue_Load_State.prefab +201 -201
- package/{Samples → Samples~}/UI_Visibility_By_Dialogue_Load_State.prefab.meta +7 -7
- package/{Samples → Samples~}/UI_Visibility_On_Bool_With_Event.prefab +57 -57
- package/{Samples → Samples~}/UI_Visibility_On_Bool_With_Event.prefab.meta +7 -7
- package/{Samples → Samples~}/UI_Visibility_On_Dialogue_Event.prefab +54 -54
- package/{Samples → Samples~}/UI_Visibility_On_Dialogue_Event.prefab.meta +7 -7
- package/{Samples → Samples~}/UI_Visibility_On_Inverse_Trial_Mode.prefab +142 -142
- package/{Samples → Samples~}/UI_Visibility_On_Inverse_Trial_Mode.prefab.meta +7 -7
- package/{Samples → Samples~}/UI_Visibility_On_Safe_State.prefab +198 -198
- package/{Samples → Samples~}/UI_Visibility_On_Safe_State.prefab.meta +7 -7
- package/{Samples → Samples~}/Video_Visibility_ETemplate.prefab +252 -252
- package/{Samples → Samples~}/Video_Visibility_ETemplate.prefab.meta +7 -7
- package/SetActiveVisibility.cs +41 -41
- package/SetActiveVisibility.cs.meta +11 -11
- package/ShowDialogueUIHandler.cs +112 -112
- package/ShowDialogueUIHandler.cs.meta +11 -11
- package/SizeDeltaVisibility.cs +112 -112
- package/SizeDeltaVisibility.cs.meta +11 -11
- package/SlidePositionVisibility.cs +177 -177
- package/SlidePositionVisibility.cs.meta +11 -11
- package/StateVisibilityEntry.cs +26 -26
- package/StateVisibilityEntry.cs.meta +1 -1
- package/ToggleTextVisibility.cs +59 -59
- package/ToggleTextVisibility.cs.meta +11 -11
- package/TransformUIVisibility.cs +172 -172
- package/TransformUIVisibility.cs.meta +1 -1
- package/UIVisibilityByDialogueLoadState.cs +93 -93
- package/UIVisibilityByDialogueLoadState.cs.meta +11 -11
- package/UIVisibilityComponent.cs +144 -144
- package/UIVisibilityComponent.cs.meta +11 -11
- package/UIVisibilityHandler.cs +39 -39
- package/UIVisibilityHandler.cs.meta +11 -11
- package/UIVisibilityOnBoolWithEvent.cs +104 -104
- package/UIVisibilityOnBoolWithEvent.cs.meta +11 -11
- package/UIVisibilityOnDialogueEvent.cs +68 -68
- package/UIVisibilityOnDialogueEvent.cs.meta +11 -11
- package/UIVisibilityOnDialogueFinish.cs +100 -100
- package/UIVisibilityOnDialogueFinish.cs.meta +11 -11
- package/UIVisibilityOnSafeState.cs +65 -65
- package/UIVisibilityOnSafeState.cs.meta +11 -11
- package/UIVisibilityOnSceneEvents.cs +52 -52
- package/UIVisibilityOnSceneEvents.cs.meta +11 -11
- package/UIVisibilityUtility.cs +38 -38
- package/UIVisibilityUtility.cs.meta +11 -11
- package/VideoVisibility.cs +107 -107
- package/VideoVisibility.cs.meta +11 -11
- package/VisibilityEntryBase.cs +43 -43
- package/VisibilityEntryBase.cs.meta +1 -1
- package/WaitForAnimationOnLoad.cs +45 -45
- package/WaitForAnimationOnLoad.cs.meta +11 -11
- package/package.json +42 -37
- package/package.json.meta +7 -7
- package/Samples.meta +0 -8
package/.attestation.p7m
ADDED
|
Binary file
|
|
@@ -1,129 +1,129 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.Dialogues;
|
|
3
|
-
using DREditor.Services;
|
|
4
|
-
using System.Collections;
|
|
5
|
-
using UnityEngine;
|
|
6
|
-
|
|
7
|
-
namespace DREditor.UIHandling
|
|
8
|
-
{
|
|
9
|
-
/// <summary>
|
|
10
|
-
///
|
|
11
|
-
/// </summary>
|
|
12
|
-
[ClassHeader(nameof(UIVisibilityComponent) +
|
|
13
|
-
"\n\n")]
|
|
14
|
-
public class AnimatorBoolUIVisibility : UIVisibilityComponent, IToTitleScreen
|
|
15
|
-
{
|
|
16
|
-
/// <summary>
|
|
17
|
-
///
|
|
18
|
-
/// </summary>
|
|
19
|
-
[Tooltip("")]
|
|
20
|
-
[SerializeField] protected bool debugLogs = false;
|
|
21
|
-
|
|
22
|
-
/// <summary>
|
|
23
|
-
///
|
|
24
|
-
/// </summary>
|
|
25
|
-
[Tooltip("")]
|
|
26
|
-
[SerializeField] protected Animator animator = null;
|
|
27
|
-
|
|
28
|
-
/// <summary>
|
|
29
|
-
///
|
|
30
|
-
/// </summary>
|
|
31
|
-
[Tooltip("")]
|
|
32
|
-
[SerializeField] protected string showBoolTriggerName = "HideBox"; // ShowDUI MoveDUI ConfirmSelect Appear On DisplayName
|
|
33
|
-
|
|
34
|
-
/// <summary>
|
|
35
|
-
///
|
|
36
|
-
/// </summary>
|
|
37
|
-
[Tooltip("")]
|
|
38
|
-
[SerializeField] protected string hideBoolTriggerName = "HideBox"; // ShowDUI MoveDUI ConfirmSelect Appear On DisplayName
|
|
39
|
-
|
|
40
|
-
/// <summary>
|
|
41
|
-
///
|
|
42
|
-
/// </summary>
|
|
43
|
-
[Tooltip("")]
|
|
44
|
-
[SerializeField] protected bool setBoolOnShow = true;
|
|
45
|
-
|
|
46
|
-
/// <summary>
|
|
47
|
-
///
|
|
48
|
-
/// </summary>
|
|
49
|
-
[Tooltip("")]
|
|
50
|
-
[SerializeField] protected bool setBoolOnHide = false;
|
|
51
|
-
|
|
52
|
-
/// <summary>
|
|
53
|
-
///
|
|
54
|
-
/// </summary>
|
|
55
|
-
[Tooltip("")]
|
|
56
|
-
[SerializeField] protected int animatorLayer = 0;
|
|
57
|
-
|
|
58
|
-
/// <summary>
|
|
59
|
-
///
|
|
60
|
-
/// </summary>
|
|
61
|
-
[Tooltip("")]
|
|
62
|
-
[SerializeField] protected bool rebindOnTitleScreen = false;
|
|
63
|
-
|
|
64
|
-
/// <summary>
|
|
65
|
-
///
|
|
66
|
-
/// </summary>
|
|
67
|
-
[Tooltip("")]
|
|
68
|
-
[SerializeField] protected bool hideOnTitleScreen = false;
|
|
69
|
-
|
|
70
|
-
/// <summary>
|
|
71
|
-
///
|
|
72
|
-
/// </summary>
|
|
73
|
-
[Tooltip("")]
|
|
74
|
-
[SerializeField] protected bool rebindOnHide = false;
|
|
75
|
-
|
|
76
|
-
/// <summary>
|
|
77
|
-
///
|
|
78
|
-
/// </summary>
|
|
79
|
-
[Tooltip("")]
|
|
80
|
-
[SerializeField] protected bool keepAnimatorStateOnDisable = false;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
protected virtual void Awake()
|
|
84
|
-
{
|
|
85
|
-
if (animator != null)
|
|
86
|
-
animator.keepAnimatorStateOnDisable = keepAnimatorStateOnDisable;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/// <inheritdoc/>
|
|
90
|
-
protected override void ShowUI() => UpdateVisibility(showBoolTriggerName, setBoolOnShow);
|
|
91
|
-
|
|
92
|
-
/// <inheritdoc/>
|
|
93
|
-
protected override void HideUI()
|
|
94
|
-
{
|
|
95
|
-
UpdateVisibility(hideBoolTriggerName, setBoolOnHide);
|
|
96
|
-
|
|
97
|
-
if (rebindOnHide)
|
|
98
|
-
animator.Rebind();
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
/// <summary>
|
|
103
|
-
///
|
|
104
|
-
/// </summary>
|
|
105
|
-
/// <param name="trigger"></param>
|
|
106
|
-
/// <param name="triggerState"></param>
|
|
107
|
-
protected virtual void UpdateVisibility(string trigger, bool triggerState)
|
|
108
|
-
{
|
|
109
|
-
if (debugLogs)
|
|
110
|
-
UnityEngine.Debug.Log($"REPORT: {gameObject.name}: Is setting {trigger} to {triggerState}.");
|
|
111
|
-
|
|
112
|
-
animator.SetBool(trigger, triggerState);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
/// <inheritdoc/>
|
|
116
|
-
protected override IEnumerator WaitForUIToComplete() => animator.WaitForStateToComplete(animatorLayer);
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
/// <inheritdoc/>
|
|
120
|
-
public virtual void ToTitleScreen()
|
|
121
|
-
{
|
|
122
|
-
if (hideOnTitleScreen)
|
|
123
|
-
Hide();
|
|
124
|
-
|
|
125
|
-
if (rebindOnTitleScreen)
|
|
126
|
-
animator.Rebind();
|
|
127
|
-
}
|
|
128
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.Dialogues;
|
|
3
|
+
using DREditor.Services;
|
|
4
|
+
using System.Collections;
|
|
5
|
+
using UnityEngine;
|
|
6
|
+
|
|
7
|
+
namespace DREditor.UIHandling
|
|
8
|
+
{
|
|
9
|
+
/// <summary>
|
|
10
|
+
///
|
|
11
|
+
/// </summary>
|
|
12
|
+
[ClassHeader(nameof(UIVisibilityComponent) +
|
|
13
|
+
"\n\n")]
|
|
14
|
+
public class AnimatorBoolUIVisibility : UIVisibilityComponent, IToTitleScreen
|
|
15
|
+
{
|
|
16
|
+
/// <summary>
|
|
17
|
+
///
|
|
18
|
+
/// </summary>
|
|
19
|
+
[Tooltip("")]
|
|
20
|
+
[SerializeField] protected bool debugLogs = false;
|
|
21
|
+
|
|
22
|
+
/// <summary>
|
|
23
|
+
///
|
|
24
|
+
/// </summary>
|
|
25
|
+
[Tooltip("")]
|
|
26
|
+
[SerializeField] protected Animator animator = null;
|
|
27
|
+
|
|
28
|
+
/// <summary>
|
|
29
|
+
///
|
|
30
|
+
/// </summary>
|
|
31
|
+
[Tooltip("")]
|
|
32
|
+
[SerializeField] protected string showBoolTriggerName = "HideBox"; // ShowDUI MoveDUI ConfirmSelect Appear On DisplayName
|
|
33
|
+
|
|
34
|
+
/// <summary>
|
|
35
|
+
///
|
|
36
|
+
/// </summary>
|
|
37
|
+
[Tooltip("")]
|
|
38
|
+
[SerializeField] protected string hideBoolTriggerName = "HideBox"; // ShowDUI MoveDUI ConfirmSelect Appear On DisplayName
|
|
39
|
+
|
|
40
|
+
/// <summary>
|
|
41
|
+
///
|
|
42
|
+
/// </summary>
|
|
43
|
+
[Tooltip("")]
|
|
44
|
+
[SerializeField] protected bool setBoolOnShow = true;
|
|
45
|
+
|
|
46
|
+
/// <summary>
|
|
47
|
+
///
|
|
48
|
+
/// </summary>
|
|
49
|
+
[Tooltip("")]
|
|
50
|
+
[SerializeField] protected bool setBoolOnHide = false;
|
|
51
|
+
|
|
52
|
+
/// <summary>
|
|
53
|
+
///
|
|
54
|
+
/// </summary>
|
|
55
|
+
[Tooltip("")]
|
|
56
|
+
[SerializeField] protected int animatorLayer = 0;
|
|
57
|
+
|
|
58
|
+
/// <summary>
|
|
59
|
+
///
|
|
60
|
+
/// </summary>
|
|
61
|
+
[Tooltip("")]
|
|
62
|
+
[SerializeField] protected bool rebindOnTitleScreen = false;
|
|
63
|
+
|
|
64
|
+
/// <summary>
|
|
65
|
+
///
|
|
66
|
+
/// </summary>
|
|
67
|
+
[Tooltip("")]
|
|
68
|
+
[SerializeField] protected bool hideOnTitleScreen = false;
|
|
69
|
+
|
|
70
|
+
/// <summary>
|
|
71
|
+
///
|
|
72
|
+
/// </summary>
|
|
73
|
+
[Tooltip("")]
|
|
74
|
+
[SerializeField] protected bool rebindOnHide = false;
|
|
75
|
+
|
|
76
|
+
/// <summary>
|
|
77
|
+
///
|
|
78
|
+
/// </summary>
|
|
79
|
+
[Tooltip("")]
|
|
80
|
+
[SerializeField] protected bool keepAnimatorStateOnDisable = false;
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
protected virtual void Awake()
|
|
84
|
+
{
|
|
85
|
+
if (animator != null)
|
|
86
|
+
animator.keepAnimatorStateOnDisable = keepAnimatorStateOnDisable;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/// <inheritdoc/>
|
|
90
|
+
protected override void ShowUI() => UpdateVisibility(showBoolTriggerName, setBoolOnShow);
|
|
91
|
+
|
|
92
|
+
/// <inheritdoc/>
|
|
93
|
+
protected override void HideUI()
|
|
94
|
+
{
|
|
95
|
+
UpdateVisibility(hideBoolTriggerName, setBoolOnHide);
|
|
96
|
+
|
|
97
|
+
if (rebindOnHide)
|
|
98
|
+
animator.Rebind();
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
/// <summary>
|
|
103
|
+
///
|
|
104
|
+
/// </summary>
|
|
105
|
+
/// <param name="trigger"></param>
|
|
106
|
+
/// <param name="triggerState"></param>
|
|
107
|
+
protected virtual void UpdateVisibility(string trigger, bool triggerState)
|
|
108
|
+
{
|
|
109
|
+
if (debugLogs)
|
|
110
|
+
UnityEngine.Debug.Log($"REPORT: {gameObject.name}: Is setting {trigger} to {triggerState}.");
|
|
111
|
+
|
|
112
|
+
animator.SetBool(trigger, triggerState);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/// <inheritdoc/>
|
|
116
|
+
protected override IEnumerator WaitForUIToComplete() => animator.WaitForStateToComplete(animatorLayer);
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
/// <inheritdoc/>
|
|
120
|
+
public virtual void ToTitleScreen()
|
|
121
|
+
{
|
|
122
|
+
if (hideOnTitleScreen)
|
|
123
|
+
Hide();
|
|
124
|
+
|
|
125
|
+
if (rebindOnTitleScreen)
|
|
126
|
+
animator.Rebind();
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
129
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: fea97891c16958842b43df9b1f05879e
|
|
3
|
-
MonoImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
serializedVersion: 2
|
|
6
|
-
defaultReferences: []
|
|
7
|
-
executionOrder: 0
|
|
8
|
-
icon: {instanceID: 0}
|
|
9
|
-
userData:
|
|
10
|
-
assetBundleName:
|
|
11
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: fea97891c16958842b43df9b1f05879e
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
package/AnimatorUIVisibility.cs
CHANGED
|
@@ -1,102 +1,102 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.Dialogues;
|
|
3
|
-
using DREditor.Services;
|
|
4
|
-
using System.Collections;
|
|
5
|
-
using UnityEngine;
|
|
6
|
-
|
|
7
|
-
namespace DREditor.UIHandling
|
|
8
|
-
{
|
|
9
|
-
/// <summary>
|
|
10
|
-
///
|
|
11
|
-
/// </summary>
|
|
12
|
-
[ClassHeader(nameof(UIVisibilityComponent) + ", " + nameof(IUIVisibility) + ", " + nameof(IToTitleScreen) +
|
|
13
|
-
"\n\n")]
|
|
14
|
-
public class AnimatorUIVisibility : UIVisibilityComponent, IToTitleScreen
|
|
15
|
-
{
|
|
16
|
-
/// <summary>
|
|
17
|
-
///
|
|
18
|
-
/// </summary>
|
|
19
|
-
[Tooltip("")]
|
|
20
|
-
[SerializeField] protected Animator animator = null;
|
|
21
|
-
|
|
22
|
-
/// <summary>
|
|
23
|
-
///
|
|
24
|
-
/// </summary>
|
|
25
|
-
[Tooltip("")]
|
|
26
|
-
[SerializeField] protected string showStateName = "ShowMainUI"; // ShowProtag ShowInstant
|
|
27
|
-
|
|
28
|
-
/// <summary>
|
|
29
|
-
///
|
|
30
|
-
/// </summary>
|
|
31
|
-
[Tooltip("")]
|
|
32
|
-
[SerializeField] protected string hideStateName = "HideMainUI"; // HideProtag HideInstant
|
|
33
|
-
|
|
34
|
-
/// <summary>
|
|
35
|
-
///
|
|
36
|
-
/// </summary>
|
|
37
|
-
[Tooltip("")]
|
|
38
|
-
[SerializeField] protected int animatorLayer = 0;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
/// <summary>
|
|
42
|
-
///
|
|
43
|
-
/// </summary>
|
|
44
|
-
[Header("")]
|
|
45
|
-
[Divider]
|
|
46
|
-
[Tooltip("")]
|
|
47
|
-
[SerializeField] protected bool rebindOnPlay = false;
|
|
48
|
-
|
|
49
|
-
/// <summary>
|
|
50
|
-
///
|
|
51
|
-
/// </summary>
|
|
52
|
-
[Tooltip("")]
|
|
53
|
-
[SerializeField] protected bool rebindOnTitleScreen = false;
|
|
54
|
-
|
|
55
|
-
/// <summary>
|
|
56
|
-
///
|
|
57
|
-
/// </summary>
|
|
58
|
-
[Tooltip("")]
|
|
59
|
-
[SerializeField] protected bool hideOnTitleScreen = true;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
protected virtual void Start()
|
|
63
|
-
{
|
|
64
|
-
if (animator == null && !TryGetComponent(out animator))
|
|
65
|
-
UnityEngine.Debug.LogError("ALERT: An animator component must be referenced or on the gameobject of this component!");
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/// <inheritdoc/>
|
|
69
|
-
protected override void ShowUI() => PlayAnimation(showStateName, animatorLayer);
|
|
70
|
-
|
|
71
|
-
/// <inheritdoc/>
|
|
72
|
-
protected override void HideUI() => PlayAnimation(hideStateName, animatorLayer);
|
|
73
|
-
|
|
74
|
-
/// <summary>
|
|
75
|
-
///
|
|
76
|
-
/// </summary>
|
|
77
|
-
/// <param name="animationName"></param>
|
|
78
|
-
/// <param name="animatorLayer"></param>
|
|
79
|
-
protected virtual void PlayAnimation(string animationName, int animatorLayer)
|
|
80
|
-
{
|
|
81
|
-
if (rebindOnPlay)
|
|
82
|
-
animator.Rebind();
|
|
83
|
-
|
|
84
|
-
if (!string.IsNullOrEmpty(animationName))
|
|
85
|
-
animator.Play(animationName, animatorLayer);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/// <inheritdoc/>
|
|
89
|
-
protected override IEnumerator WaitForUIToComplete() => animator.WaitForStateToComplete(animatorLayer);
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
/// <inheritdoc/>
|
|
93
|
-
public virtual void ToTitleScreen()
|
|
94
|
-
{
|
|
95
|
-
if (hideOnTitleScreen)
|
|
96
|
-
Hide();
|
|
97
|
-
|
|
98
|
-
if (rebindOnTitleScreen)
|
|
99
|
-
animator.Rebind();
|
|
100
|
-
}
|
|
101
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.Dialogues;
|
|
3
|
+
using DREditor.Services;
|
|
4
|
+
using System.Collections;
|
|
5
|
+
using UnityEngine;
|
|
6
|
+
|
|
7
|
+
namespace DREditor.UIHandling
|
|
8
|
+
{
|
|
9
|
+
/// <summary>
|
|
10
|
+
///
|
|
11
|
+
/// </summary>
|
|
12
|
+
[ClassHeader(nameof(UIVisibilityComponent) + ", " + nameof(IUIVisibility) + ", " + nameof(IToTitleScreen) +
|
|
13
|
+
"\n\n")]
|
|
14
|
+
public class AnimatorUIVisibility : UIVisibilityComponent, IToTitleScreen
|
|
15
|
+
{
|
|
16
|
+
/// <summary>
|
|
17
|
+
///
|
|
18
|
+
/// </summary>
|
|
19
|
+
[Tooltip("")]
|
|
20
|
+
[SerializeField] protected Animator animator = null;
|
|
21
|
+
|
|
22
|
+
/// <summary>
|
|
23
|
+
///
|
|
24
|
+
/// </summary>
|
|
25
|
+
[Tooltip("")]
|
|
26
|
+
[SerializeField] protected string showStateName = "ShowMainUI"; // ShowProtag ShowInstant
|
|
27
|
+
|
|
28
|
+
/// <summary>
|
|
29
|
+
///
|
|
30
|
+
/// </summary>
|
|
31
|
+
[Tooltip("")]
|
|
32
|
+
[SerializeField] protected string hideStateName = "HideMainUI"; // HideProtag HideInstant
|
|
33
|
+
|
|
34
|
+
/// <summary>
|
|
35
|
+
///
|
|
36
|
+
/// </summary>
|
|
37
|
+
[Tooltip("")]
|
|
38
|
+
[SerializeField] protected int animatorLayer = 0;
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
/// <summary>
|
|
42
|
+
///
|
|
43
|
+
/// </summary>
|
|
44
|
+
[Header("")]
|
|
45
|
+
[Divider]
|
|
46
|
+
[Tooltip("")]
|
|
47
|
+
[SerializeField] protected bool rebindOnPlay = false;
|
|
48
|
+
|
|
49
|
+
/// <summary>
|
|
50
|
+
///
|
|
51
|
+
/// </summary>
|
|
52
|
+
[Tooltip("")]
|
|
53
|
+
[SerializeField] protected bool rebindOnTitleScreen = false;
|
|
54
|
+
|
|
55
|
+
/// <summary>
|
|
56
|
+
///
|
|
57
|
+
/// </summary>
|
|
58
|
+
[Tooltip("")]
|
|
59
|
+
[SerializeField] protected bool hideOnTitleScreen = true;
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
protected virtual void Start()
|
|
63
|
+
{
|
|
64
|
+
if (animator == null && !TryGetComponent(out animator))
|
|
65
|
+
UnityEngine.Debug.LogError("ALERT: An animator component must be referenced or on the gameobject of this component!");
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/// <inheritdoc/>
|
|
69
|
+
protected override void ShowUI() => PlayAnimation(showStateName, animatorLayer);
|
|
70
|
+
|
|
71
|
+
/// <inheritdoc/>
|
|
72
|
+
protected override void HideUI() => PlayAnimation(hideStateName, animatorLayer);
|
|
73
|
+
|
|
74
|
+
/// <summary>
|
|
75
|
+
///
|
|
76
|
+
/// </summary>
|
|
77
|
+
/// <param name="animationName"></param>
|
|
78
|
+
/// <param name="animatorLayer"></param>
|
|
79
|
+
protected virtual void PlayAnimation(string animationName, int animatorLayer)
|
|
80
|
+
{
|
|
81
|
+
if (rebindOnPlay)
|
|
82
|
+
animator.Rebind();
|
|
83
|
+
|
|
84
|
+
if (!string.IsNullOrEmpty(animationName))
|
|
85
|
+
animator.Play(animationName, animatorLayer);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/// <inheritdoc/>
|
|
89
|
+
protected override IEnumerator WaitForUIToComplete() => animator.WaitForStateToComplete(animatorLayer);
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
/// <inheritdoc/>
|
|
93
|
+
public virtual void ToTitleScreen()
|
|
94
|
+
{
|
|
95
|
+
if (hideOnTitleScreen)
|
|
96
|
+
Hide();
|
|
97
|
+
|
|
98
|
+
if (rebindOnTitleScreen)
|
|
99
|
+
animator.Rebind();
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
102
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: f5a06d60636d0eb4e9fafb7f44e70613
|
|
3
|
-
MonoImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
serializedVersion: 2
|
|
6
|
-
defaultReferences: []
|
|
7
|
-
executionOrder: 0
|
|
8
|
-
icon: {instanceID: 0}
|
|
9
|
-
userData:
|
|
10
|
-
assetBundleName:
|
|
11
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: f5a06d60636d0eb4e9fafb7f44e70613
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|