23#include "../third_party/nlohmann/json.hpp"
< Provides AssetID and INVALID_ASSET_ID
Represents one arithmetic operand (left A, right B) in a MathOp node.
Mode
Discriminates the data source of this operand.
@ Variable
References a blackboard variable by name.
@ Const
Literal constant value.
@ Pin
External data-input pin on the owning node.
std::string variableName
Blackboard key (mode == Variable), e.g. "mMoveSpeed".
std::string dynamicPinID
UUID of the DynamicDataPin that supplies this operand's value.
std::string constValue
Literal string (mode == Const), e.g. "5.0".
nlohmann::json ToJson() const
Serializes this MathOpOperand to a JSON object.
static MathOpOperand FromJson(const nlohmann::json &data)
Deserializes a MathOpOperand from a JSON object.
Complete reference for a MathOp node: left operand, operator, right operand.
static MathOpRef FromJson(const nlohmann::json &data)
Deserializes a MathOpRef from a JSON object.
MathOpOperand leftOperand
Left-hand side operand (A)
std::string mathOperator
Arithmetic operator: "+", "-", "*", "/", "%", "^".
nlohmann::json ToJson() const
Serializes this MathOpRef to a JSON object.
std::string GetDisplayString() const
Returns a human-readable display string for the operation.
MathOpOperand rightOperand
Right-hand side operand (B)