diff --git a/Editor/Core/UIElements/Graph/Ports/CeresPortView.cs b/Editor/Core/UIElements/Graph/Ports/CeresPortView.cs
index 7d633f4..bd098f1 100644
--- a/Editor/Core/UIElements/Graph/Ports/CeresPortView.cs
+++ b/Editor/Core/UIElements/Graph/Ports/CeresPortView.cs
@@ -134,13 +134,13 @@ private CeresPortElement(Orientation portOrientation, Direction portDirection, C
protected virtual void BuildContextualMenu(ContextualMenuPopulateEvent evt)
{
evt.menu.ClearItems();
- evt.menu.MenuItems().Add(new CeresDropdownMenuAction("Disconnect", a =>
+ evt.menu.MenuItems().Add(new CeresDropdownMenuAction("Disconnect", _ =>
{
var edge = connections.First();
edge.input.Disconnect(edge);
edge.output.Disconnect(edge);
View.NodeOwner.GraphView.DeleteElements(new []{ edge });
- }, a => connections.Any() ? DropdownMenuAction.Status.Normal : DropdownMenuAction.Status.Hidden));
+ }, _ => connections.Any() ? DropdownMenuAction.Status.Normal : DropdownMenuAction.Status.Hidden));
View.NodeOwner.GraphView.ContextualMenuRegistry.BuildContextualMenu(ContextualMenuType.Port, evt, portType);
}
@@ -176,6 +176,8 @@ public static CeresPortElement Create(CeresPortView ownerView)
public bool IsConnectable()
{
+ /* Can not connect when invisible */
+ if (style.display == DisplayStyle.None) return false;
return !connected || capacity != Capacity.Single;
}
@@ -579,5 +581,15 @@ public static void HidePort(this CeresPortView portView)
{
portView.PortElement.style.display = DisplayStyle.None;
}
+
+ ///
+ /// Whether port is visible
+ ///
+ ///
+ ///
+ public static bool IsVisible(this CeresPortView portView)
+ {
+ return portView.PortElement.style.display == DisplayStyle.Flex;
+ }
}
}
\ No newline at end of file
diff --git a/Editor/Flow/ExecutableNodeSearchWindow.cs b/Editor/Flow/ExecutableNodeSearchWindow.cs
index 8d25c15..778ad99 100644
--- a/Editor/Flow/ExecutableNodeSearchWindow.cs
+++ b/Editor/Flow/ExecutableNodeSearchWindow.cs
@@ -252,7 +252,7 @@ private void BuildExecutableFunctionEntries(CeresNodeSearchEntryBuilder builder,
builder.AddGroupEntry("Execute Functions", 1);
foreach (var method in methods)
{
- var functionName = ExecutableFunctionRegistry.GetFunctionName(method, false);
+ var functionName = ExecutableFunction.GetFunctionName(method, false);
builder.AddEntry(new SearchTreeEntry(new GUIContent($"{functionName}", _indentationIcon))
{
level = 2,
diff --git a/Editor/Flow/Nodes/ExecuteFunctionNodeView.cs b/Editor/Flow/Nodes/ExecuteFunctionNodeView.cs
index 4bfa4ef..107dd82 100644
--- a/Editor/Flow/Nodes/ExecuteFunctionNodeView.cs
+++ b/Editor/Flow/Nodes/ExecuteFunctionNodeView.cs
@@ -18,6 +18,8 @@ public abstract class ExecuteFunctionNodeView : ExecutableNodeView
protected bool IsScriptMethod { get; private set; }
+ protected bool ExecuteInDependency { get; private set; }
+
protected bool DisplayTarget { get; private set; }
protected bool IsSelfTarget { get; private set; }
@@ -28,12 +30,13 @@ public void SetMethodInfo(MethodInfo methodInfo)
MethodInfo = methodInfo;
MethodName = methodInfo.Name;
IsStatic = methodInfo.IsStatic;
- IsScriptMethod = ExecutableFunctionRegistry.IsScriptMethod(methodInfo);
- DisplayTarget = ExecutableFunctionRegistry.CanDisplayTarget(methodInfo);
- IsSelfTarget = ExecutableFunctionRegistry.IsSelfTarget(methodInfo);
- SetNodeElementTitle(ExecutableFunctionRegistry.GetFunctionName(methodInfo));
+ IsScriptMethod = ExecutableFunction.IsScriptMethod(methodInfo);
+ ExecuteInDependency = ExecutableFunction.ExecuteInDependency(methodInfo);
+ DisplayTarget = ExecutableFunction.CanDisplayTarget(methodInfo);
+ IsSelfTarget = ExecutableFunction.IsSelfTarget(methodInfo);
+ SetNodeElementTitle(ExecutableFunction.GetFunctionName(methodInfo));
FillMethodParametersPorts(methodInfo);
- if (ExecutableFunctionRegistry.IsNeedResolveReturnType(methodInfo))
+ if (ExecutableFunction.IsNeedResolveReturnType(methodInfo))
{
ResolveMethodReturnPort(methodInfo);
}
@@ -41,11 +44,16 @@ public void SetMethodInfo(MethodInfo methodInfo)
{
NodeElement.AddToClassList("ConstNode");
}
+ if (ExecuteInDependency)
+ {
+ FindPortView("input").HidePort();
+ FindPortView("exec").HidePort();
+ }
}
private void ResolveMethodReturnPort(MethodInfo methodInfo)
{
- var resolveParameter = ExecutableFunctionRegistry.GetResolveReturnTypeParameter(methodInfo);
+ var resolveParameter = ExecutableFunction.GetResolveReturnTypeParameter(methodInfo);
var portView = FindPortViewWithDisplayName(CeresLabel.GetLabel(resolveParameter.Name));
var returnPortView = FindPortView("output");
var currentType = (portView.FieldResolver.Value as SerializedTypeBase)?.GetObjectType();
@@ -62,7 +70,7 @@ private void SetNodeElementTitle(string functionTitle)
var targetType = NodeType.GetGenericArguments()[0];
if (MethodInfo != null)
{
- targetType = ExecutableFunctionRegistry.GetTargetType(MethodInfo) ?? NodeType.GetGenericArguments()[0];
+ targetType = ExecutableFunction.GetTargetType(MethodInfo) ?? NodeType.GetGenericArguments()[0];
}
if(!IsStatic || DisplayTarget)
{
@@ -102,6 +110,7 @@ public sealed override void SetNodeInstance(CeresNode ceresNode)
IsStatic = functionNode.isStatic;
IsScriptMethod = functionNode.isScriptMethod;
IsSelfTarget = functionNode.isSelfTarget;
+ ExecuteInDependency = functionNode.executeInDependency;
SetNodeElementTitle(functionNode.methodName);
}
else
@@ -118,6 +127,7 @@ public override ExecutableNode CompileNode()
instance.isStatic = IsStatic;
instance.isScriptMethod = IsScriptMethod;
instance.isSelfTarget = IsSelfTarget;
+ instance.executeInDependency = ExecuteInDependency;
return instance;
}
@@ -167,17 +177,17 @@ protected override void FillMethodParametersPorts(MethodInfo methodInfo)
}
if (DisplayTarget)
{
- FindPortView("inputs", 0).SetDisplayName("Target");
+ FindPortView("inputs").SetDisplayName("Target");
}
if (IsSelfTarget)
{
- FindPortView("inputs", 0).SetTooltip(" [Default is Self]");
+ FindPortView("inputs").SetTooltip(" [Default is Self]");
}
var output = methodInfo.ReturnParameter;
if (output!.ParameterType == typeof(void)) return;
- var outputPortData = new CeresPortData()
+ var outputPortData = new CeresPortData
{
/* Remap to actual property */
propertyName = "outputs",
diff --git a/Runtime/Core/Models/Graph/Nodes/CeresNode.cs b/Runtime/Core/Models/Graph/Nodes/CeresNode.cs
index ccef4bd..b2262a0 100644
--- a/Runtime/Core/Models/Graph/Nodes/CeresNode.cs
+++ b/Runtime/Core/Models/Graph/Nodes/CeresNode.cs
@@ -135,10 +135,19 @@ public virtual CeresNodeData GetSerializedData()
{
/* Allows polymorphic serialization */
var data = NodeData.Clone();
- data.executionPath = GetExecutionPath(GetType());
+ data.executionPath = GetExecutionPath();
data.Serialize(this);
return data;
}
+
+ ///
+ /// Get node instance execution path
+ ///
+ ///
+ public virtual ExecutionPath GetExecutionPath()
+ {
+ return GetExecutionPath(GetType());
+ }
public virtual IEnumerator GetEnumerator()
{
@@ -159,12 +168,12 @@ public static ExecutionPath GetExecutionPath(Type nodeType)
return ExecutionPath.Forward;
}
- var path = paths[0];
- if (path is "Forward" or "forward")
+ var path = paths[0].ToLower();
+ if (path == "forward")
{
return ExecutionPath.Forward;
}
- if (path is "Dependency" or "dependency")
+ if (path == "dependency")
{
return ExecutionPath.Dependency;
}
diff --git a/Runtime/Flow/Annotations/ExecutableFunctionAttribute.cs b/Runtime/Flow/Annotations/ExecutableFunctionAttribute.cs
index b177c36..f20ab0c 100644
--- a/Runtime/Flow/Annotations/ExecutableFunctionAttribute.cs
+++ b/Runtime/Flow/Annotations/ExecutableFunctionAttribute.cs
@@ -1,5 +1,4 @@
using System;
-using Chris.Serialization;
namespace Ceres.Graph.Flow.Annotations
{
///
@@ -12,6 +11,14 @@ public sealed class ExecutableFunctionAttribute : Attribute
/// Function should use first parameter type as its script type
///
public bool IsScriptMethod { get; set; }
+
+ ///
+ /// Function can be executed in dependency execution path, only support static method
+ ///
+ /// Functions executed in dependency mode should not depend on the execution order
+ /// between nodes, and only execute based on the input values. For functions whose input
+ /// parameters contain reference types, it is more appropriate to use forward path.
+ public bool ExecuteInDependency { get; set; }
///
/// Function should display first parameter as method declare type target, need set first
@@ -21,16 +28,6 @@ public sealed class ExecutableFunctionAttribute : Attribute
///
/// Function first parameter that should pass graph context object as default value
///
- public bool IsSelfTarget { get; set; } = false;
- }
-
-
- public static class ExecutableFunction
- {
- // ReSharper disable once InconsistentNaming
- ///
- /// Metadata for function parameter to resolve return type, only support
- ///
- public const string RESOLVE_RETURN = nameof(RESOLVE_RETURN);
+ public bool IsSelfTarget { get; set; }
}
}
\ No newline at end of file
diff --git a/Runtime/Flow/Models/ExecutableReflection.cs b/Runtime/Flow/Models/ExecutableReflection.cs
index 8e7d102..6f4aa0e 100644
--- a/Runtime/Flow/Models/ExecutableReflection.cs
+++ b/Runtime/Flow/Models/ExecutableReflection.cs
@@ -1,9 +1,10 @@
using System;
using System.Collections.Generic;
+using System.Linq;
using System.Reflection;
-using UnityEngine;
-using UnityEngine.Assertions;
-
+using Ceres.Annotations;
+using Ceres.Graph.Flow.Annotations;
+using Chris.Serialization;
namespace Ceres.Graph.Flow
{
public enum ExecutableFunctionType
@@ -53,6 +54,89 @@ protected static void ReallocateDelegateIfNeed(ref Delegate outDelega
}
}
+ public class ExecutableFunction
+ {
+ // ReSharper disable once InconsistentNaming
+ ///
+ /// Metadata for function parameter to resolve return type, only support
+ ///
+ public const string RESOLVE_RETURN = nameof(RESOLVE_RETURN);
+
+ public static bool IsScriptMethod(MethodInfo methodInfo)
+ {
+ if (!methodInfo.IsStatic) return false;
+ var parameters = methodInfo.GetParameters();
+ if (parameters.Length < 1) return false;
+
+ return methodInfo.GetCustomAttribute().IsScriptMethod;
+ }
+
+ public static bool ExecuteInDependency(MethodInfo methodInfo)
+ {
+ if (!methodInfo.IsStatic) return false;
+ return methodInfo.GetCustomAttribute().ExecuteInDependency;
+ }
+
+ public static bool CanDisplayTarget(MethodInfo methodInfo)
+ {
+ if (!methodInfo.IsStatic) return false;
+ var parameters = methodInfo.GetParameters();
+ if (parameters.Length < 1) return false;
+
+ var attribute = methodInfo.GetCustomAttribute();
+ if (attribute == null) return false;
+ return attribute.IsScriptMethod && attribute.DisplayTarget;
+ }
+
+ public static bool IsNeedResolveReturnType(MethodInfo methodInfo)
+ {
+ var parameters = methodInfo.GetParameters();
+ if (parameters.Length < 1) return false;
+ if (methodInfo.ReturnType == typeof(void)) return false;
+
+ return parameters.Any(x=> CeresMetadata.IsDefined(x, ExecutableFunction.RESOLVE_RETURN));
+ }
+
+ public static bool IsSelfTarget(MethodInfo methodInfo)
+ {
+ if (!methodInfo.IsStatic) return false;
+ var parameters = methodInfo.GetParameters();
+ if (parameters.Length < 1) return false;
+
+ var attribute = methodInfo.GetCustomAttribute();
+ if (attribute == null) return false;
+ return attribute.IsSelfTarget;
+ }
+
+ public static Type GetTargetType(MethodInfo methodInfo)
+ {
+ if (!methodInfo.IsStatic) return null;
+ var parameters = methodInfo.GetParameters();
+ if (parameters.Length < 1) return null;
+
+ if (methodInfo.GetCustomAttribute().IsScriptMethod)
+ {
+ return parameters[0].ParameterType;
+ }
+
+ return null;
+ }
+
+ public static ParameterInfo GetResolveReturnTypeParameter(MethodInfo methodInfo)
+ {
+ var parameters = methodInfo.GetParameters();
+ if (parameters.Length < 1) return null;
+
+ return parameters.First(x => CeresMetadata.IsDefined(x, ExecutableFunction.RESOLVE_RETURN));
+ }
+
+ public static string GetFunctionName(MethodInfo methodInfo, bool richText = true)
+ {
+ var labelAttribute = methodInfo.GetCustomAttribute();
+ return labelAttribute != null ? labelAttribute.GetLabel(richText) : methodInfo.Name.Replace("Flow_", string.Empty);
+ }
+ }
+
public readonly struct ExecutableFunctionInfo: IEquatable
{
public readonly ExecutableFunctionType FunctionType;
@@ -89,7 +173,7 @@ public override string ToString()
// ReSharper disable once ClassNeverInstantiated.Global
public class ExecutableReflection: ExecutableReflection
{
- public class ExecutableFunction
+ public class ExecutableFunction: Flow.ExecutableFunction
{
public readonly ExecutableFunctionInfo FunctionInfo;
diff --git a/Runtime/Flow/Models/Nodes/Utilities/FlowNode_ExecuteFunction.cs b/Runtime/Flow/Models/Nodes/Utilities/FlowNode_ExecuteFunction.cs
index c58f327..6f1dd68 100644
--- a/Runtime/Flow/Models/Nodes/Utilities/FlowNode_ExecuteFunction.cs
+++ b/Runtime/Flow/Models/Nodes/Utilities/FlowNode_ExecuteFunction.cs
@@ -14,6 +14,9 @@ public abstract class FlowNode_ExecuteFunction: FlowNode
[HideInGraphEditor]
public bool isStatic;
+ [HideInGraphEditor]
+ public bool executeInDependency;
+
[HideInGraphEditor]
public bool isSelfTarget;
@@ -72,6 +75,11 @@ protected TValue GetSelfTargetOrDefault(CeresPort inputPort, Exe
}
return inputPort.Value;
}
+
+ public override ExecutionPath GetExecutionPath()
+ {
+ return executeInDependency ? ExecutionPath.Dependency : ExecutionPath.Forward;
+ }
}
public abstract class FlowNode_ExecuteFunctionUber: FlowNode_ExecuteFunction
diff --git a/Runtime/Flow/Utilities/ExecutableFunctionRegistry.cs b/Runtime/Flow/Utilities/ExecutableFunctionRegistry.cs
index a81f0da..e72b55f 100644
--- a/Runtime/Flow/Utilities/ExecutableFunctionRegistry.cs
+++ b/Runtime/Flow/Utilities/ExecutableFunctionRegistry.cs
@@ -33,7 +33,7 @@ private ExecutableFunctionRegistry()
.Where(x=>x.GetCustomAttribute() != null)
.Distinct()
.ToList();
- var groups = methodInfos.GroupBy(GetTargetType)
+ var groups = methodInfos.GroupBy(ExecutableFunction.GetTargetType)
.Where(x=>x.Key != null)
.ToArray();
_staticFunctions = methodInfos.Except(groups.SelectMany(x => x)).ToArray();
@@ -51,74 +51,6 @@ private static IEnumerable GetExecutableFunctions(Type type)
.Where(methodInfo => methodInfo.GetCustomAttribute() != null);
}
- public static bool IsScriptMethod(MethodInfo methodInfo)
- {
- if (!methodInfo.IsStatic) return false;
- var parameters = methodInfo.GetParameters();
- if (parameters.Length < 1) return false;
-
- return methodInfo.GetCustomAttribute().IsScriptMethod;
- }
-
- public static bool CanDisplayTarget(MethodInfo methodInfo)
- {
- if (!methodInfo.IsStatic) return false;
- var parameters = methodInfo.GetParameters();
- if (parameters.Length < 1) return false;
-
- var attribute = methodInfo.GetCustomAttribute();
- if (attribute == null) return false;
- return attribute.IsScriptMethod && attribute.DisplayTarget;
- }
-
- public static bool IsNeedResolveReturnType(MethodInfo methodInfo)
- {
- var parameters = methodInfo.GetParameters();
- if (parameters.Length < 1) return false;
- if (methodInfo.ReturnType == typeof(void)) return false;
-
- return parameters.Any(x=> CeresMetadata.IsDefined(x, ExecutableFunction.RESOLVE_RETURN));
- }
-
- public static bool IsSelfTarget(MethodInfo methodInfo)
- {
- if (!methodInfo.IsStatic) return false;
- var parameters = methodInfo.GetParameters();
- if (parameters.Length < 1) return false;
-
- var attribute = methodInfo.GetCustomAttribute();
- if (attribute == null) return false;
- return attribute.IsSelfTarget;
- }
-
- public static Type GetTargetType(MethodInfo methodInfo)
- {
- if (!methodInfo.IsStatic) return null;
- var parameters = methodInfo.GetParameters();
- if (parameters.Length < 1) return null;
-
- if (methodInfo.GetCustomAttribute().IsScriptMethod)
- {
- return parameters[0].ParameterType;
- }
-
- return null;
- }
-
- public static ParameterInfo GetResolveReturnTypeParameter(MethodInfo methodInfo)
- {
- var parameters = methodInfo.GetParameters();
- if (parameters.Length < 1) return null;
-
- return parameters.First(x => CeresMetadata.IsDefined(x, ExecutableFunction.RESOLVE_RETURN));
- }
-
- public static string GetFunctionName(MethodInfo methodInfo, bool richText = true)
- {
- var labelAttribute = methodInfo.GetCustomAttribute();
- return labelAttribute != null ? labelAttribute.GetLabel(richText) : methodInfo.Name.Replace("Flow_", string.Empty);
- }
-
public static ExecutableFunctionRegistry Get()
{
return _instance ??= new ExecutableFunctionRegistry();
diff --git a/Runtime/Flow/Utilities/Libraries/MathExecutableFunctionLibrary.cs b/Runtime/Flow/Utilities/Libraries/MathExecutableFunctionLibrary.cs
index 99bb130..9a26ce7 100644
--- a/Runtime/Flow/Utilities/Libraries/MathExecutableFunctionLibrary.cs
+++ b/Runtime/Flow/Utilities/Libraries/MathExecutableFunctionLibrary.cs
@@ -12,79 +12,92 @@ public class MathExecutableFunctionLibrary : ExecutableFunctionLibrary
{
#region Float
- [ExecutableFunction(IsScriptMethod = true, DisplayTarget = false), CeresLabel("+", FontSize = 30)]
+ [ExecutableFunction(IsScriptMethod = true, ExecuteInDependency = true, DisplayTarget = false),
+ CeresLabel("+", FontSize = 30)]
public static float Flow_FloatAdd(float value1, float value2)
{
return value1 + value2;
}
- [ExecutableFunction(IsScriptMethod = true, DisplayTarget = false), CeresLabel("-", FontSize = 30)]
+ [ExecutableFunction(IsScriptMethod = true, ExecuteInDependency = true, DisplayTarget = false),
+ CeresLabel("-", FontSize = 30)]
public static float Flow_FloatSubtract(float value1, float value2)
{
return value1 - value2;
}
- [ExecutableFunction(IsScriptMethod = true, DisplayTarget = false), CeresLabel("*", FontSize = 30)]
+ [ExecutableFunction(IsScriptMethod = true, ExecuteInDependency = true, DisplayTarget = false),
+ CeresLabel("*", FontSize = 30)]
public static float Flow_FloatMultiply(float value1, float value2)
{
return value1 * value2;
}
- [ExecutableFunction(IsScriptMethod = true, DisplayTarget = false), CeresLabel("/", FontSize = 30)]
+ [ExecutableFunction(IsScriptMethod = true, ExecuteInDependency = true, DisplayTarget = false),
+ CeresLabel("/", FontSize = 30)]
public static float Flow_FloatDivide(float value1, float value2)
{
return value1 / value2;
}
- [ExecutableFunction(IsScriptMethod = true, DisplayTarget = false), CeresLabel("%", FontSize = 30)]
+ [ExecutableFunction(IsScriptMethod = true, ExecuteInDependency = true, DisplayTarget = false),
+ CeresLabel("%", FontSize = 30)]
public static float Flow_FloatModulo(float value1, float value2)
{
return value1 % value2;
}
- [ExecutableFunction(IsScriptMethod = true, DisplayTarget = false), CeresLabel("Pow", FontSize = 30)]
+ [ExecutableFunction(IsScriptMethod = true, ExecuteInDependency = true, DisplayTarget = false),
+ CeresLabel("Pow", FontSize = 30)]
public static float Flow_FloatPow(float value1, float value2)
{
return Mathf.Pow(value1, value2);
}
- [ExecutableFunction(IsScriptMethod = true, DisplayTarget = false), CeresLabel("Sqrt", FontSize = 30)]
+ [ExecutableFunction(IsScriptMethod = true, ExecuteInDependency = true, DisplayTarget = false),
+ CeresLabel("Sqrt", FontSize = 30)]
public static float Flow_FloatSqrt(float floatValue)
{
return Mathf.Sqrt(floatValue);
}
- [ExecutableFunction(IsScriptMethod = true, DisplayTarget = false), CeresLabel("Exp", FontSize = 30)]
+ [ExecutableFunction(IsScriptMethod = true, ExecuteInDependency = true, DisplayTarget = false),
+ CeresLabel("Exp", FontSize = 30)]
public static float Flow_FloatExp(float floatValue)
{
return Mathf.Exp(floatValue);
}
- [ExecutableFunction(IsScriptMethod = true, DisplayTarget = false), CeresLabel("<", FontSize = 30)]
+ [ExecutableFunction(IsScriptMethod = true, ExecuteInDependency = true, DisplayTarget = false),
+ CeresLabel("<", FontSize = 30)]
public static bool Flow_FloatLessThan(float value1, float value2)
{
return value1 < value2;
}
- [ExecutableFunction(IsScriptMethod = true, DisplayTarget = false), CeresLabel("<=", FontSize = 30)]
+ [ExecutableFunction(IsScriptMethod = true, ExecuteInDependency = true, DisplayTarget = false),
+ CeresLabel("<=", FontSize = 30)]
public static bool Flow_FloatLessThanOrEqualTo(float value1, float value2)
{
return value1 <= value2;
}
- [ExecutableFunction(IsScriptMethod = true, DisplayTarget = false), CeresLabel(">", FontSize = 30)]
+ [ExecutableFunction(IsScriptMethod = true, ExecuteInDependency = true, DisplayTarget = false),
+ CeresLabel(">", FontSize = 30)]
public static bool Flow_FloatGreaterThan(float value1, float value2)
{
return value1 > value2;
}
- [ExecutableFunction(IsScriptMethod = true, DisplayTarget = false), CeresLabel(">=", FontSize = 30)]
+ [ExecutableFunction(IsScriptMethod = true, ExecuteInDependency = true, DisplayTarget = false),
+ CeresLabel(">=", FontSize = 30)]
public static bool Flow_FloatGreaterThanOrEqualTo(float value1, float value2)
{
return value1 >= value2;
}
- [ExecutableFunction(IsScriptMethod = true, DisplayTarget = false), CeresLabel("To Int")]
+ [ExecutableFunction(IsScriptMethod = true, ExecuteInDependency = true, DisplayTarget = false),
+ CeresLabel("To Int")]
public static int Flow_FloatToInt(float floatValue)
{
return (int)floatValue;
@@ -94,62 +107,72 @@ public static int Flow_FloatToInt(float floatValue)
#region Integer
- [ExecutableFunction(IsScriptMethod = true, DisplayTarget = false), CeresLabel("+", FontSize = 30)]
+ [ExecutableFunction(IsScriptMethod = true, ExecuteInDependency = true, DisplayTarget = false),
+ CeresLabel("+", FontSize = 30)]
public static int Flow_IntAdd(int value1, int value2)
{
return value1 + value2;
}
- [ExecutableFunction(IsScriptMethod = true, DisplayTarget = false), CeresLabel("-", FontSize = 30)]
+ [ExecutableFunction(IsScriptMethod = true, ExecuteInDependency = true, DisplayTarget = false),
+ CeresLabel("-", FontSize = 30)]
public static int Flow_IntSubtract(int value1, int value2)
{
return value1 - value2;
}
- [ExecutableFunction(IsScriptMethod = true, DisplayTarget = false), CeresLabel("*", FontSize = 30)]
+ [ExecutableFunction(IsScriptMethod = true, ExecuteInDependency = true, DisplayTarget = false),
+ CeresLabel("*", FontSize = 30)]
public static int Flow_IntMultiply(int value1, int value2)
{
return value1 * value2;
}
- [ExecutableFunction(IsScriptMethod = true, DisplayTarget = false), CeresLabel("/", FontSize = 30)]
+ [ExecutableFunction(IsScriptMethod = true, ExecuteInDependency = true, DisplayTarget = false),
+ CeresLabel("/", FontSize = 30)]
public static int Flow_IntDivide(int value1, int value2)
{
return value1 / value2;
}
- [ExecutableFunction(IsScriptMethod = true, DisplayTarget = false), CeresLabel("%", FontSize = 30)]
+ [ExecutableFunction(IsScriptMethod = true, ExecuteInDependency = true, DisplayTarget = false),
+ CeresLabel("%", FontSize = 30)]
public static int Flow_IntModulo(int value1, int value2)
{
return value1 % value2;
}
- [ExecutableFunction(IsScriptMethod = true, DisplayTarget = false), CeresLabel("<", FontSize = 30)]
+ [ExecutableFunction(IsScriptMethod = true, ExecuteInDependency = true, DisplayTarget = false),
+ CeresLabel("<", FontSize = 30)]
public static bool Flow_IntLessThan(int value1, int value2)
{
return value1 < value2;
}
- [ExecutableFunction(IsScriptMethod = true, DisplayTarget = false), CeresLabel("<=", FontSize = 30)]
+ [ExecutableFunction(IsScriptMethod = true, ExecuteInDependency = true, DisplayTarget = false),
+ CeresLabel("<=", FontSize = 30)]
public static bool Flow_IntLessThanOrEqualTo(int value1, int value2)
{
return value1 <= value2;
}
- [ExecutableFunction(IsScriptMethod = true, DisplayTarget = false), CeresLabel(">", FontSize = 30)]
+ [ExecutableFunction(IsScriptMethod = true, ExecuteInDependency = true, DisplayTarget = false),
+ CeresLabel(">", FontSize = 30)]
public static bool Flow_IntGreaterThan(int value1, int value2)
{
return value1 > value2;
}
- [ExecutableFunction(IsScriptMethod = true, DisplayTarget = false), CeresLabel(">=", FontSize = 30)]
+ [ExecutableFunction(IsScriptMethod = true, ExecuteInDependency = true, DisplayTarget = false),
+ CeresLabel(">=", FontSize = 30)]
public static bool Flow_IntGreaterThanOrEqualTo(int value1, int value2)
{
return value1 >= value2;
}
- [ExecutableFunction(IsScriptMethod = true, DisplayTarget = false), CeresLabel("To Float")]
+ [ExecutableFunction(IsScriptMethod = true, ExecuteInDependency = true, DisplayTarget = false),
+ CeresLabel("To Float")]
public static float Flow_IntToFloat(int intValue)
{
return intValue;
@@ -159,19 +182,22 @@ public static float Flow_IntToFloat(int intValue)
#region Boolean
- [ExecutableFunction(IsScriptMethod = true, DisplayTarget = false), CeresLabel("!", FontSize = 30)]
+ [ExecutableFunction(IsScriptMethod = true, ExecuteInDependency = true, DisplayTarget = false),
+ CeresLabel("!", FontSize = 30)]
public static bool Flow_BoolInvert(bool boolValue)
{
return !boolValue;
}
- [ExecutableFunction(IsScriptMethod = true, DisplayTarget = false), CeresLabel("&&", FontSize = 30)]
+ [ExecutableFunction(IsScriptMethod = true, ExecuteInDependency = true, DisplayTarget = false),
+ CeresLabel("&&", FontSize = 30)]
public static bool Flow_BoolAnd(bool value1, bool value2)
{
return value1 && value2;
}
- [ExecutableFunction(IsScriptMethod = true, DisplayTarget = false), CeresLabel("||", FontSize = 30)]
+ [ExecutableFunction(IsScriptMethod = true, ExecuteInDependency = true, DisplayTarget = false),
+ CeresLabel("||", FontSize = 30)]
public static bool Flow_BoolOr(bool value1, bool value2)
{
return value1 || value2;