mirror of
https://github.com/unity-atoms/unity-atoms.git
synced 2025-01-21 23:58:49 -05:00
Use ResetValue in example scene
This commit is contained in:
parent
e732dad66a
commit
8c8bc5fb81
@ -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}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c46649faf19d34725b64762f8ad7e76c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user