更新至unity6并且更改Scriptable完成
This commit is contained in:
@@ -16,11 +16,6 @@ namespace Demo.Game
|
||||
|
||||
protected override abstract void UpdateData(float data);
|
||||
|
||||
public override IEnumerator LoadScript(string script)
|
||||
{
|
||||
yield return base.LoadScript(script);
|
||||
}
|
||||
|
||||
public override IEnumerator UnloadScript()
|
||||
{
|
||||
MySplineCore = null;
|
||||
@@ -34,26 +29,19 @@ namespace Demo.Game
|
||||
/// <param name="value"></param>
|
||||
/// <param name="curveType">可取值为30种缓动曲线</param>
|
||||
[Convention.RScript.Variable.Attr.Method]
|
||||
public void Add(string time, string value, string curveType)
|
||||
public void Add(float time, float value, MathExtension.EaseCurveType curveType)
|
||||
{
|
||||
ManualAddEntry(time, float.Parse(value), Enum.Parse<MathExtension.EaseCurveType>(curveType));
|
||||
ManualAddEntry(time, value, curveType);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 如未加载则加载,然后绑定到样条线
|
||||
/// 绑定到样条线
|
||||
/// </summary>
|
||||
/// <param name="path">脚本位置</param>
|
||||
[Convention.RScript.Variable.Attr.Method]
|
||||
public IEnumerator Load(string path)
|
||||
public void Load(SplineCore splineCore)
|
||||
{
|
||||
MySplineCore = FindWithPath(path, false) as SplineCore;
|
||||
if (MySplineCore == null)
|
||||
{
|
||||
yield return DoLoadSubScriptAsync(nameof(SplineCore), path, x =>
|
||||
{
|
||||
MySplineCore = x as SplineCore;
|
||||
});
|
||||
}
|
||||
MySplineCore = splineCore;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user