开始转换函数输入以匹配新的解析器
This commit is contained in:
@@ -431,13 +431,27 @@ namespace Demo
|
||||
public static float OneBarTime = 1;
|
||||
|
||||
/// <summary>
|
||||
/// 从字符串解析为浮点数
|
||||
/// <list type="bullet">从时间点列表<see cref="TimePoints"/>中获取</list>
|
||||
/// <list type="bullet">或是从上下文变量<see cref="GetCompleteScriptContext"/>中获取</list>
|
||||
/// <list type="bullet">或是从数据驱动对象<see cref="DDT{float}"/>的<see cref="float"/>泛型中获取</list>
|
||||
/// <list type="bullet">或是从数据驱动对象<see cref="DDT"/>中获取</list>
|
||||
/// <list type="bullet">或是通过计算表达式值获取</list>
|
||||
/// <list type="bullet">或是直接调用<see cref="float.Parse(string)"/></list>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[ScriptableCall(@"
|
||||
<summary>
|
||||
从字符串解析为浮点数
|
||||
从时间点列表中获取
|
||||
或是从上下文变量中获取
|
||||
或是从数据驱动对象中获取
|
||||
或是通过计算表达式值获取
|
||||
或是直接调用float.Parse(string)
|
||||
</summary>
|
||||
<param name=""value""></param>
|
||||
<returns></returns>
|
||||
")]
|
||||
public float Parse(string value)
|
||||
{
|
||||
value = value.Trim();
|
||||
@@ -900,13 +914,24 @@ namespace Demo
|
||||
|
||||
public ScriptableObject Parent;
|
||||
|
||||
/// <summary>
|
||||
/// 获取根脚本对象
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[ScriptableCall(@"
|
||||
<summary>
|
||||
获取根脚本对象
|
||||
</summary>
|
||||
<returns></returns>
|
||||
")]
|
||||
public RootObject GetRoot()
|
||||
{
|
||||
if (Parent == null)
|
||||
return this as RootObject;
|
||||
if (Parent is RootObject result)
|
||||
return result;
|
||||
else return Parent.GetRoot();
|
||||
else
|
||||
return Parent.GetRoot();
|
||||
}
|
||||
|
||||
public List<ScriptableObject> Childs = new();
|
||||
|
||||
Reference in New Issue
Block a user