diff --git a/UnityAtomsTestsAndExamples/Assets/Examples/Intro/UI/ResetHealthButton/ResetHealth.asset b/UnityAtomsTestsAndExamples/Assets/Examples/Intro/UI/ResetHealthButton/ResetHealth.asset index 5e7617e2..d4739cb9 100644 --- a/UnityAtomsTestsAndExamples/Assets/Examples/Intro/UI/ResetHealthButton/ResetHealth.asset +++ b/UnityAtomsTestsAndExamples/Assets/Examples/Intro/UI/ResetHealthButton/ResetHealth.asset @@ -9,11 +9,8 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 95d65c506b2924c1aa582cd252c7ed17, type: 3} + m_Script: {fileID: 11500000, guid: c46649faf19d34725b64762f8ad7e76c, type: 3} m_Name: ResetHealth m_EditorClassIdentifier: - _variable: {fileID: 11400000, guid: 30c71ebe6587c4fe8b18d5279710b4dc, type: 2} - _value: - UseConstant: 1 - ConstantValue: 100 - Variable: {fileID: 0} + _developerDescription: + _variable: {fileID: 0} diff --git a/UnityAtomsTestsAndExamples/Assets/Examples/Intro/UI/ResetHealthButton/ResetHealth.cs b/UnityAtomsTestsAndExamples/Assets/Examples/Intro/UI/ResetHealthButton/ResetHealth.cs new file mode 100644 index 00000000..31eeb9df --- /dev/null +++ b/UnityAtomsTestsAndExamples/Assets/Examples/Intro/UI/ResetHealthButton/ResetHealth.cs @@ -0,0 +1,17 @@ +using UnityEngine; +using UnityEngine.Serialization; + +namespace UnityAtoms.Examples +{ + [CreateAssetMenu(menuName = "Unity Atoms/Examples/Intro/Reset Health", fileName = "ResetHealth")] + public class ResetHealth : VoidAction + { + [SerializeField] + private IntVariable _variable = null; + + public override void Do() + { + _variable.ResetValue(true); + } + } +} diff --git a/UnityAtomsTestsAndExamples/Assets/Examples/Intro/UI/ResetHealthButton/ResetHealth.cs.meta b/UnityAtomsTestsAndExamples/Assets/Examples/Intro/UI/ResetHealthButton/ResetHealth.cs.meta new file mode 100644 index 00000000..850b5736 --- /dev/null +++ b/UnityAtomsTestsAndExamples/Assets/Examples/Intro/UI/ResetHealthButton/ResetHealth.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c46649faf19d34725b64762f8ad7e76c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityAtomsTestsAndExamples/Assets/IconAssignmentSettings.json b/UnityAtomsTestsAndExamples/Assets/IconAssignmentSettings.json index 3ed301d8..e6a5ee65 100644 --- a/UnityAtomsTestsAndExamples/Assets/IconAssignmentSettings.json +++ b/UnityAtomsTestsAndExamples/Assets/IconAssignmentSettings.json @@ -635,6 +635,10 @@ { "AssetPath": "Packages/com.mambojambostudios.unity-atoms-src/Constants/GameObjectConstant.cs", "IconPath": "Packages/com.mambojambostudios.unity-atoms-src/IconMap/atom-icon-teal.png" + }, + { + "AssetPath": "Assets/Examples/Intro/UI/ResetHealthButton/ResetHealth.cs", + "IconPath": "Packages/com.mambojambostudios.unity-atoms-src/IconMap/atom-icon-purple.png" } ] } \ No newline at end of file