summaryrefslogtreecommitdiff
path: root/Assets/Thirdparty/Tayx/Graphy - Ultimate Stats Monitor/Scene/Customization Scripts/UpdateTextWithSliderValue.cs
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2020-08-20 23:40:50 -0400
committerAndrew Lee <alee14498@protonmail.com>2020-08-20 23:40:50 -0400
commit3af4c218c0e70167db23a6303d2af30aff37d2fe (patch)
tree927f29edcf54ab562f40f3d1c6cb69287c7f5980 /Assets/Thirdparty/Tayx/Graphy - Ultimate Stats Monitor/Scene/Customization Scripts/UpdateTextWithSliderValue.cs
parentb6daed0af784f4e9bc13329dd87c671b06ee1c65 (diff)
downloadProject-Sandbox-3af4c218c0e70167db23a6303d2af30aff37d2fe.tar.gz
Project-Sandbox-3af4c218c0e70167db23a6303d2af30aff37d2fe.tar.bz2
Project-Sandbox-3af4c218c0e70167db23a6303d2af30aff37d2fe.zip
Removed a bunch of stuff; Changes
Diffstat (limited to 'Assets/Thirdparty/Tayx/Graphy - Ultimate Stats Monitor/Scene/Customization Scripts/UpdateTextWithSliderValue.cs')
-rw-r--r--Assets/Thirdparty/Tayx/Graphy - Ultimate Stats Monitor/Scene/Customization Scripts/UpdateTextWithSliderValue.cs62
1 files changed, 62 insertions, 0 deletions
diff --git a/Assets/Thirdparty/Tayx/Graphy - Ultimate Stats Monitor/Scene/Customization Scripts/UpdateTextWithSliderValue.cs b/Assets/Thirdparty/Tayx/Graphy - Ultimate Stats Monitor/Scene/Customization Scripts/UpdateTextWithSliderValue.cs
new file mode 100644
index 0000000..ed491fe
--- /dev/null
+++ b/Assets/Thirdparty/Tayx/Graphy - Ultimate Stats Monitor/Scene/Customization Scripts/UpdateTextWithSliderValue.cs
@@ -0,0 +1,62 @@
+/* ---------------------------------------
+ * Author: Martin Pane (martintayx@gmail.com) (@tayx94)
+ * Collaborators: Lars Aalbertsen (@Rockylars)
+ * Project: Graphy - Ultimate Stats Monitor
+ * Date: 05-Mar-18
+ * Studio: Tayx
+ *
+ * This project is released under the MIT license.
+ * Attribution is not required, but it is always welcomed!
+ * -------------------------------------*/
+
+using UnityEngine;
+using UnityEngine.UI;
+
+using System.Collections;
+
+namespace Tayx.Graphy.CustomizationScene
+{
+ [RequireComponent(typeof(Text))]
+ public class UpdateTextWithSliderValue : MonoBehaviour
+ {
+ /* ----- TODO: ----------------------------
+ * Check if we can seal this class.
+ * Add summaries to the variables.
+ * Add summaries to the functions.
+ * Check if we can remove "using System.Collections;".
+ * Check if we should add "private" to the Unity Callbacks.
+ * --------------------------------------*/
+
+ #region Variables -> Serialized Private
+
+ [SerializeField] private Slider m_slider = null;
+
+ #endregion
+
+ #region Variables -> Private
+
+ private Text m_text;
+
+ #endregion
+
+ #region Methods -> Unity Callbacks
+
+ void Start()
+ {
+ m_text = GetComponent<Text>();
+
+ m_slider.onValueChanged.AddListener(UpdateText);
+ }
+
+ #endregion
+
+ #region Methods -> Private
+
+ private void UpdateText(float value)
+ {
+ m_text.text = value.ToString();
+ }
+
+ #endregion
+ }
+} \ No newline at end of file