33 lines
1.1 KiB
C#
33 lines
1.1 KiB
C#
![]() |
#if GRAPH_DESIGNER
|
||
|
/// ---------------------------------------------
|
||
|
/// Behavior Designer
|
||
|
/// Copyright (c) Opsive. All Rights Reserved.
|
||
|
/// https://www.opsive.com
|
||
|
/// ---------------------------------------------
|
||
|
namespace Opsive.BehaviorDesigner.Runtime.Tasks.Actions.Math
|
||
|
{
|
||
|
using Opsive.GraphDesigner.Runtime;
|
||
|
using Opsive.GraphDesigner.Runtime.Variables;
|
||
|
using UnityEngine;
|
||
|
|
||
|
[NodeDescription("Set the boolean value.")]
|
||
|
[Shared.Utility.Category("Math")]
|
||
|
public class SetBool : Action
|
||
|
{
|
||
|
[Tooltip("The bool value to set.")]
|
||
|
[SerializeField] protected SharedVariable<bool> m_Value;
|
||
|
[Tooltip("The variable that should be set.")]
|
||
|
[RequireShared] [SerializeField] protected SharedVariable<bool> m_StoreResult;
|
||
|
|
||
|
/// <summary>
|
||
|
/// Executes the task.
|
||
|
/// </summary>
|
||
|
/// <returns>The execution status of the task.</returns>
|
||
|
public override TaskStatus OnUpdate()
|
||
|
{
|
||
|
m_StoreResult.Value = m_Value.Value;
|
||
|
return TaskStatus.Success;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
#endif
|