net.dreditor.purchasing 0.1.6 → 0.1.7
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/BufferedSelectedUICacher.cs +73 -73
- package/BufferedSelectedUICacher.cs.meta +1 -1
- package/DREditor.Purchasing.asmdef +18 -18
- package/DREditor.Purchasing.asmdef.meta +7 -7
- package/DigitArrow.cs +143 -143
- package/DigitArrow.cs.meta +11 -11
- package/DisplayCurrencyDigits.cs +122 -122
- package/DisplayCurrencyDigits.cs.meta +1 -1
- package/DisplayDigit.cs +83 -83
- package/DisplayDigit.cs.meta +1 -1
- package/DisplayDigits.cs +147 -147
- package/DisplayDigits.cs.meta +1 -1
- package/EnableInputOnPurchaseComplete.cs +11 -11
- package/EnableInputOnPurchaseComplete.cs.meta +1 -1
- package/FollowSelectedObject.cs +19 -19
- package/FollowSelectedObject.cs.meta +1 -1
- package/IDigitPlace.cs +27 -27
- package/IDigitPlace.cs.meta +1 -1
- package/IntPurchaseInputHandler.cs +77 -77
- package/IntPurchaseInputHandler.cs.meta +1 -1
- package/PurchaseInputHandlerBase.cs +132 -132
- package/PurchaseInputHandlerBase.cs.meta +1 -1
- package/{Samples → Samples~}/Buffered_Selected_UI_Cacher.prefab +48 -48
- package/{Samples → Samples~}/Buffered_Selected_UI_Cacher.prefab.meta +7 -7
- package/{Samples → Samples~}/Enable_Input_On_Purchase_Complete.prefab +55 -55
- package/{Samples → Samples~}/Enable_Input_On_Purchase_Complete.prefab.meta +7 -7
- package/{Samples → Samples~}/FTE_Currency_Arrows_ETemplate.prefab +248 -248
- package/{Samples → Samples~}/FTE_Currency_Arrows_ETemplate.prefab.meta +7 -7
- package/{Samples → Samples~}/FTE_Currency_Canvas_ETemplate.prefab +736 -736
- package/{Samples → Samples~}/FTE_Currency_Canvas_ETemplate.prefab.meta +7 -7
- package/{Samples → Samples~}/FTE_Input_Amount_Display_ETemplate.prefab +646 -646
- package/{Samples → Samples~}/FTE_Input_Amount_Display_ETemplate.prefab.meta +7 -7
- package/{Samples → Samples~}/FTE_Owned_Amount_Display_ETemplate.prefab +263 -263
- package/{Samples → Samples~}/FTE_Owned_Amount_Display_ETemplate.prefab.meta +7 -7
- package/{Samples → Samples~}/FTE_Purchase_Complete_Handler.prefab +57 -57
- package/{Samples → Samples~}/FTE_Purchase_Complete_Handler.prefab.meta +7 -7
- package/{Samples → Samples~}/Hundreds_Digit.prefab +201 -201
- package/{Samples → Samples~}/Hundreds_Digit.prefab.meta +7 -7
- package/{Samples → Samples~}/On_Cant_Purchase_Listener.prefab +52 -52
- package/{Samples → Samples~}/On_Cant_Purchase_Listener.prefab.meta +7 -7
- package/{Samples → Samples~}/On_Purchase_Listener.prefab +52 -52
- package/{Samples → Samples~}/On_Purchase_Listener.prefab.meta +7 -7
- package/{Samples → Samples~}/Ones_Digit.prefab +220 -220
- package/{Samples → Samples~}/Ones_Digit.prefab.meta +7 -7
- package/{Samples → Samples~}/Tens_Digit.prefab +201 -201
- package/{Samples → Samples~}/Tens_Digit.prefab.meta +7 -7
- package/SelectedUICacher.cs +75 -75
- package/SelectedUICacher.cs.meta +1 -1
- package/package.json +42 -37
- package/package.json.meta +7 -7
- package/Samples.meta +0 -8
package/.attestation.p7m
ADDED
|
Binary file
|
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using System;
|
|
3
|
-
using System.Collections;
|
|
4
|
-
using UnityEngine;
|
|
5
|
-
|
|
6
|
-
namespace DREditor.Purchasing
|
|
7
|
-
{
|
|
8
|
-
/// <summary>
|
|
9
|
-
///
|
|
10
|
-
/// </summary>
|
|
11
|
-
public class BufferedSelectedUICacher : SelectedUICacher
|
|
12
|
-
{
|
|
13
|
-
/// <summary>
|
|
14
|
-
///
|
|
15
|
-
/// </summary>
|
|
16
|
-
[Header("")]
|
|
17
|
-
[Space]
|
|
18
|
-
[Tooltip("")]
|
|
19
|
-
[SerializeField] protected float selectBufferDuration = 0.5f;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
/// <summary>
|
|
23
|
-
///
|
|
24
|
-
/// </summary>
|
|
25
|
-
protected bool waitingThroughBuffer = false;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
/// <inheritdoc/>
|
|
29
|
-
public override void CacheObject() => CacheObjectResponse()?.Invoke();
|
|
30
|
-
|
|
31
|
-
/// <summary>
|
|
32
|
-
///
|
|
33
|
-
/// </summary>
|
|
34
|
-
/// <returns></returns>
|
|
35
|
-
protected virtual Action CacheObjectResponse() => waitingThroughBuffer ? ResetBuffer : base.CacheObject;
|
|
36
|
-
|
|
37
|
-
/// <summary>
|
|
38
|
-
///
|
|
39
|
-
/// </summary>
|
|
40
|
-
protected virtual void ResetBuffer()
|
|
41
|
-
{
|
|
42
|
-
StopAllCoroutines();
|
|
43
|
-
|
|
44
|
-
SetWaitingThroughBuffer(false);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
/// <inheritdoc/>
|
|
49
|
-
protected override bool ShouldSelectCachedObject() => !waitingThroughBuffer && base.ShouldSelectCachedObject();
|
|
50
|
-
|
|
51
|
-
/// <inheritdoc/>
|
|
52
|
-
protected override void SelectCachedObject() => StartCoroutine(BufferSelection());
|
|
53
|
-
|
|
54
|
-
/// <summary>
|
|
55
|
-
///
|
|
56
|
-
/// </summary>
|
|
57
|
-
protected virtual IEnumerator BufferSelection()
|
|
58
|
-
{
|
|
59
|
-
SetWaitingThroughBuffer(true);
|
|
60
|
-
|
|
61
|
-
yield return new WaitForSeconds(selectBufferDuration);
|
|
62
|
-
|
|
63
|
-
base.SelectCachedObject();
|
|
64
|
-
|
|
65
|
-
ResetBuffer();
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/// <summary>
|
|
69
|
-
///
|
|
70
|
-
/// </summary>
|
|
71
|
-
/// <param name="waitingThroughBuffer"></param>
|
|
72
|
-
protected virtual void SetWaitingThroughBuffer(bool waitingThroughBuffer) => this.waitingThroughBuffer = waitingThroughBuffer;
|
|
73
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using System;
|
|
3
|
+
using System.Collections;
|
|
4
|
+
using UnityEngine;
|
|
5
|
+
|
|
6
|
+
namespace DREditor.Purchasing
|
|
7
|
+
{
|
|
8
|
+
/// <summary>
|
|
9
|
+
///
|
|
10
|
+
/// </summary>
|
|
11
|
+
public class BufferedSelectedUICacher : SelectedUICacher
|
|
12
|
+
{
|
|
13
|
+
/// <summary>
|
|
14
|
+
///
|
|
15
|
+
/// </summary>
|
|
16
|
+
[Header("")]
|
|
17
|
+
[Space]
|
|
18
|
+
[Tooltip("")]
|
|
19
|
+
[SerializeField] protected float selectBufferDuration = 0.5f;
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
/// <summary>
|
|
23
|
+
///
|
|
24
|
+
/// </summary>
|
|
25
|
+
protected bool waitingThroughBuffer = false;
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
/// <inheritdoc/>
|
|
29
|
+
public override void CacheObject() => CacheObjectResponse()?.Invoke();
|
|
30
|
+
|
|
31
|
+
/// <summary>
|
|
32
|
+
///
|
|
33
|
+
/// </summary>
|
|
34
|
+
/// <returns></returns>
|
|
35
|
+
protected virtual Action CacheObjectResponse() => waitingThroughBuffer ? ResetBuffer : base.CacheObject;
|
|
36
|
+
|
|
37
|
+
/// <summary>
|
|
38
|
+
///
|
|
39
|
+
/// </summary>
|
|
40
|
+
protected virtual void ResetBuffer()
|
|
41
|
+
{
|
|
42
|
+
StopAllCoroutines();
|
|
43
|
+
|
|
44
|
+
SetWaitingThroughBuffer(false);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
/// <inheritdoc/>
|
|
49
|
+
protected override bool ShouldSelectCachedObject() => !waitingThroughBuffer && base.ShouldSelectCachedObject();
|
|
50
|
+
|
|
51
|
+
/// <inheritdoc/>
|
|
52
|
+
protected override void SelectCachedObject() => StartCoroutine(BufferSelection());
|
|
53
|
+
|
|
54
|
+
/// <summary>
|
|
55
|
+
///
|
|
56
|
+
/// </summary>
|
|
57
|
+
protected virtual IEnumerator BufferSelection()
|
|
58
|
+
{
|
|
59
|
+
SetWaitingThroughBuffer(true);
|
|
60
|
+
|
|
61
|
+
yield return new WaitForSeconds(selectBufferDuration);
|
|
62
|
+
|
|
63
|
+
base.SelectCachedObject();
|
|
64
|
+
|
|
65
|
+
ResetBuffer();
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/// <summary>
|
|
69
|
+
///
|
|
70
|
+
/// </summary>
|
|
71
|
+
/// <param name="waitingThroughBuffer"></param>
|
|
72
|
+
protected virtual void SetWaitingThroughBuffer(bool waitingThroughBuffer) => this.waitingThroughBuffer = waitingThroughBuffer;
|
|
73
|
+
}
|
|
74
74
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
1
|
+
fileFormatVersion: 2
|
|
2
2
|
guid: 7b5aff0506d2dd2499b7fb6beb7f5895
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "DREditor.Purchasing",
|
|
3
|
-
"rootNamespace": "",
|
|
4
|
-
"references": [
|
|
5
|
-
"Unity.InputSystem",
|
|
6
|
-
"Unity.TextMeshPro",
|
|
7
|
-
"DREditor",
|
|
8
|
-
"DREditor.EventObjectServices"
|
|
9
|
-
],
|
|
10
|
-
"includePlatforms": [],
|
|
11
|
-
"excludePlatforms": [],
|
|
12
|
-
"allowUnsafeCode": false,
|
|
13
|
-
"overrideReferences": false,
|
|
14
|
-
"precompiledReferences": [],
|
|
15
|
-
"autoReferenced": true,
|
|
16
|
-
"defineConstraints": [],
|
|
17
|
-
"versionDefines": [],
|
|
18
|
-
"noEngineReferences": false
|
|
1
|
+
{
|
|
2
|
+
"name": "DREditor.Purchasing",
|
|
3
|
+
"rootNamespace": "",
|
|
4
|
+
"references": [
|
|
5
|
+
"Unity.InputSystem",
|
|
6
|
+
"Unity.TextMeshPro",
|
|
7
|
+
"DREditor",
|
|
8
|
+
"DREditor.EventObjectServices"
|
|
9
|
+
],
|
|
10
|
+
"includePlatforms": [],
|
|
11
|
+
"excludePlatforms": [],
|
|
12
|
+
"allowUnsafeCode": false,
|
|
13
|
+
"overrideReferences": false,
|
|
14
|
+
"precompiledReferences": [],
|
|
15
|
+
"autoReferenced": true,
|
|
16
|
+
"defineConstraints": [],
|
|
17
|
+
"versionDefines": [],
|
|
18
|
+
"noEngineReferences": false
|
|
19
19
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: a7cde9b5f585acb489343da39e32a0f4
|
|
3
|
-
AssemblyDefinitionImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
userData:
|
|
6
|
-
assetBundleName:
|
|
7
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: a7cde9b5f585acb489343da39e32a0f4
|
|
3
|
+
AssemblyDefinitionImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
userData:
|
|
6
|
+
assetBundleName:
|
|
7
|
+
assetBundleVariant:
|
package/DigitArrow.cs
CHANGED
|
@@ -1,144 +1,144 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
#if DOTWEEN
|
|
3
|
-
using DG.Tweening;
|
|
4
|
-
#endif
|
|
5
|
-
using UnityEngine;
|
|
6
|
-
using UnityEngine.UI;
|
|
7
|
-
|
|
8
|
-
namespace DREditor.Purchasing
|
|
9
|
-
{
|
|
10
|
-
/// <summary>
|
|
11
|
-
///
|
|
12
|
-
/// </summary>
|
|
13
|
-
[RequireComponent(typeof(Image))]
|
|
14
|
-
public class DigitArrow : MonoBehaviour
|
|
15
|
-
{
|
|
16
|
-
/// <summary>
|
|
17
|
-
///
|
|
18
|
-
/// </summary>
|
|
19
|
-
[Header("")]
|
|
20
|
-
[Space]
|
|
21
|
-
[Header("")]
|
|
22
|
-
[Space]
|
|
23
|
-
[Tooltip("")]
|
|
24
|
-
[SerializeField] protected bool debugReset = false;
|
|
25
|
-
|
|
26
|
-
/// <summary>
|
|
27
|
-
///
|
|
28
|
-
/// </summary>
|
|
29
|
-
[Tooltip("")]
|
|
30
|
-
[SerializeField] protected Vector3 resetPosition;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
/// <summary>
|
|
34
|
-
///
|
|
35
|
-
/// </summary>
|
|
36
|
-
[Header("")]
|
|
37
|
-
[Space]
|
|
38
|
-
[Tooltip("")]
|
|
39
|
-
[SerializeField] protected Vector3 direction = Vector3.up;
|
|
40
|
-
|
|
41
|
-
/// <summary>
|
|
42
|
-
///
|
|
43
|
-
/// </summary>
|
|
44
|
-
[Tooltip("")]
|
|
45
|
-
[SerializeField] protected float duration = 0.2f;
|
|
46
|
-
|
|
47
|
-
/// <summary>
|
|
48
|
-
///
|
|
49
|
-
/// </summary>
|
|
50
|
-
[Tooltip("")]
|
|
51
|
-
[SerializeField] protected float directionMultiplier = 7;
|
|
52
|
-
|
|
53
|
-
/// <summary>
|
|
54
|
-
///
|
|
55
|
-
/// </summary>
|
|
56
|
-
[Tooltip("")]
|
|
57
|
-
[SerializeField] protected bool ignoreTimeScale = false;
|
|
58
|
-
#if DOTWEEN
|
|
59
|
-
/// <summary>
|
|
60
|
-
///
|
|
61
|
-
/// </summary>
|
|
62
|
-
[Tooltip("")]
|
|
63
|
-
[SerializeField] protected Ease easeCurve = Ease.Linear;
|
|
64
|
-
#endif
|
|
65
|
-
/// <summary>
|
|
66
|
-
///
|
|
67
|
-
/// </summary>
|
|
68
|
-
[Tooltip("")]
|
|
69
|
-
[SerializeField] protected int loops = 0;
|
|
70
|
-
#if DOTWEEN
|
|
71
|
-
/// <summary>
|
|
72
|
-
///
|
|
73
|
-
/// </summary>
|
|
74
|
-
[Tooltip("")]
|
|
75
|
-
[SerializeField] protected LoopType loopType = LoopType.Yoyo;
|
|
76
|
-
#endif
|
|
77
|
-
/// <summary>
|
|
78
|
-
///
|
|
79
|
-
/// </summary>
|
|
80
|
-
[Tooltip("")]
|
|
81
|
-
[SerializeField] protected float delay = 0f;
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
protected virtual void Awake() => Initialize();
|
|
85
|
-
|
|
86
|
-
protected virtual void OnValidate() => Initialize();
|
|
87
|
-
|
|
88
|
-
/// <summary>
|
|
89
|
-
///
|
|
90
|
-
/// </summary>
|
|
91
|
-
protected virtual void Initialize() => resetPosition = transform.localPosition;
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
protected virtual void Start() => StartAnimatingArrow();
|
|
95
|
-
|
|
96
|
-
protected virtual void Update()
|
|
97
|
-
{
|
|
98
|
-
if (debugReset)
|
|
99
|
-
StartAnimatingArrow();
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/// <summary>
|
|
103
|
-
///
|
|
104
|
-
/// </summary>
|
|
105
|
-
protected virtual void StartAnimatingArrow()
|
|
106
|
-
{
|
|
107
|
-
ResetArrow();
|
|
108
|
-
|
|
109
|
-
AnimateArrow();
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
/// <summary>
|
|
113
|
-
///
|
|
114
|
-
/// </summary>
|
|
115
|
-
protected virtual void ResetArrow()
|
|
116
|
-
{
|
|
117
|
-
debugReset = false;
|
|
118
|
-
#if DOTWEEN
|
|
119
|
-
transform.DOKill();
|
|
120
|
-
#endif
|
|
121
|
-
transform.localPosition = resetPosition;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
/// <summary>
|
|
125
|
-
///
|
|
126
|
-
/// </summary>
|
|
127
|
-
protected virtual void AnimateArrow()
|
|
128
|
-
{
|
|
129
|
-
#if DOTWEEN
|
|
130
|
-
transform.DOLocalMove(GetEndPosition(), duration)
|
|
131
|
-
.SetUpdate(ignoreTimeScale)
|
|
132
|
-
.SetEase(easeCurve)
|
|
133
|
-
.SetLoops(loops, loopType)
|
|
134
|
-
.SetDelay(delay);
|
|
135
|
-
#endif
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
/// <summary>
|
|
139
|
-
///
|
|
140
|
-
/// </summary>
|
|
141
|
-
/// <returns></returns>
|
|
142
|
-
protected virtual Vector3 GetEndPosition() => resetPosition + (direction * directionMultiplier);
|
|
143
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
#if DOTWEEN
|
|
3
|
+
using DG.Tweening;
|
|
4
|
+
#endif
|
|
5
|
+
using UnityEngine;
|
|
6
|
+
using UnityEngine.UI;
|
|
7
|
+
|
|
8
|
+
namespace DREditor.Purchasing
|
|
9
|
+
{
|
|
10
|
+
/// <summary>
|
|
11
|
+
///
|
|
12
|
+
/// </summary>
|
|
13
|
+
[RequireComponent(typeof(Image))]
|
|
14
|
+
public class DigitArrow : MonoBehaviour
|
|
15
|
+
{
|
|
16
|
+
/// <summary>
|
|
17
|
+
///
|
|
18
|
+
/// </summary>
|
|
19
|
+
[Header("")]
|
|
20
|
+
[Space]
|
|
21
|
+
[Header("")]
|
|
22
|
+
[Space]
|
|
23
|
+
[Tooltip("")]
|
|
24
|
+
[SerializeField] protected bool debugReset = false;
|
|
25
|
+
|
|
26
|
+
/// <summary>
|
|
27
|
+
///
|
|
28
|
+
/// </summary>
|
|
29
|
+
[Tooltip("")]
|
|
30
|
+
[SerializeField] protected Vector3 resetPosition;
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
/// <summary>
|
|
34
|
+
///
|
|
35
|
+
/// </summary>
|
|
36
|
+
[Header("")]
|
|
37
|
+
[Space]
|
|
38
|
+
[Tooltip("")]
|
|
39
|
+
[SerializeField] protected Vector3 direction = Vector3.up;
|
|
40
|
+
|
|
41
|
+
/// <summary>
|
|
42
|
+
///
|
|
43
|
+
/// </summary>
|
|
44
|
+
[Tooltip("")]
|
|
45
|
+
[SerializeField] protected float duration = 0.2f;
|
|
46
|
+
|
|
47
|
+
/// <summary>
|
|
48
|
+
///
|
|
49
|
+
/// </summary>
|
|
50
|
+
[Tooltip("")]
|
|
51
|
+
[SerializeField] protected float directionMultiplier = 7;
|
|
52
|
+
|
|
53
|
+
/// <summary>
|
|
54
|
+
///
|
|
55
|
+
/// </summary>
|
|
56
|
+
[Tooltip("")]
|
|
57
|
+
[SerializeField] protected bool ignoreTimeScale = false;
|
|
58
|
+
#if DOTWEEN
|
|
59
|
+
/// <summary>
|
|
60
|
+
///
|
|
61
|
+
/// </summary>
|
|
62
|
+
[Tooltip("")]
|
|
63
|
+
[SerializeField] protected Ease easeCurve = Ease.Linear;
|
|
64
|
+
#endif
|
|
65
|
+
/// <summary>
|
|
66
|
+
///
|
|
67
|
+
/// </summary>
|
|
68
|
+
[Tooltip("")]
|
|
69
|
+
[SerializeField] protected int loops = 0;
|
|
70
|
+
#if DOTWEEN
|
|
71
|
+
/// <summary>
|
|
72
|
+
///
|
|
73
|
+
/// </summary>
|
|
74
|
+
[Tooltip("")]
|
|
75
|
+
[SerializeField] protected LoopType loopType = LoopType.Yoyo;
|
|
76
|
+
#endif
|
|
77
|
+
/// <summary>
|
|
78
|
+
///
|
|
79
|
+
/// </summary>
|
|
80
|
+
[Tooltip("")]
|
|
81
|
+
[SerializeField] protected float delay = 0f;
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
protected virtual void Awake() => Initialize();
|
|
85
|
+
|
|
86
|
+
protected virtual void OnValidate() => Initialize();
|
|
87
|
+
|
|
88
|
+
/// <summary>
|
|
89
|
+
///
|
|
90
|
+
/// </summary>
|
|
91
|
+
protected virtual void Initialize() => resetPosition = transform.localPosition;
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
protected virtual void Start() => StartAnimatingArrow();
|
|
95
|
+
|
|
96
|
+
protected virtual void Update()
|
|
97
|
+
{
|
|
98
|
+
if (debugReset)
|
|
99
|
+
StartAnimatingArrow();
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/// <summary>
|
|
103
|
+
///
|
|
104
|
+
/// </summary>
|
|
105
|
+
protected virtual void StartAnimatingArrow()
|
|
106
|
+
{
|
|
107
|
+
ResetArrow();
|
|
108
|
+
|
|
109
|
+
AnimateArrow();
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/// <summary>
|
|
113
|
+
///
|
|
114
|
+
/// </summary>
|
|
115
|
+
protected virtual void ResetArrow()
|
|
116
|
+
{
|
|
117
|
+
debugReset = false;
|
|
118
|
+
#if DOTWEEN
|
|
119
|
+
transform.DOKill();
|
|
120
|
+
#endif
|
|
121
|
+
transform.localPosition = resetPosition;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/// <summary>
|
|
125
|
+
///
|
|
126
|
+
/// </summary>
|
|
127
|
+
protected virtual void AnimateArrow()
|
|
128
|
+
{
|
|
129
|
+
#if DOTWEEN
|
|
130
|
+
transform.DOLocalMove(GetEndPosition(), duration)
|
|
131
|
+
.SetUpdate(ignoreTimeScale)
|
|
132
|
+
.SetEase(easeCurve)
|
|
133
|
+
.SetLoops(loops, loopType)
|
|
134
|
+
.SetDelay(delay);
|
|
135
|
+
#endif
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/// <summary>
|
|
139
|
+
///
|
|
140
|
+
/// </summary>
|
|
141
|
+
/// <returns></returns>
|
|
142
|
+
protected virtual Vector3 GetEndPosition() => resetPosition + (direction * directionMultiplier);
|
|
143
|
+
}
|
|
144
144
|
}
|
package/DigitArrow.cs.meta
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: b997a92fc240d964287bebb61d1dcaad
|
|
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: b997a92fc240d964287bebb61d1dcaad
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|