脚本节点能够自定义变量名

This commit is contained in:
fengjiayi
2025-03-14 21:38:07 +08:00
parent ef11edf7f1
commit 1e09675ef1
9 changed files with 188 additions and 29 deletions

View File

@@ -8,12 +8,19 @@ namespace Serein.Script.Node
{
/// <summary>
/// 变量节点
/// 赋值节点
/// </summary>
public class AssignmentNode : ASTNode
{
/// <summary>
/// 变量名称
/// </summary>
public string Variable { get; }
/// <summary>
/// 对应的节点
/// </summary>
public ASTNode Value { get; }
public AssignmentNode(string variable, ASTNode value) => (Variable, Value) = (variable, value);
}