using UnityEngine; namespace Rokojori { // Set either a number or a bool variable (whichever reference is assigned). [CreateAssetMenu( menuName = "Rokojori/Dialog/Actions/Set Property" )] public class SetProperty : GameStateAction { public GameStateNumberVariable numberVariable = null; public double numberValue = 0; public GameStateBoolVariable boolVariable = null; public bool boolValue = false; public override void Execute() { if ( numberVariable != null ) { GameStateManager.instance.SetValue( numberVariable, numberValue ); } if ( boolVariable != null ) { GameStateManager.instance.SetValue( boolVariable, boolValue ); } } } }