1.修复一些错误2.准备专门提供基于距离的spline3.tracydll存在崩溃问题
This commit is contained in:
@@ -2,6 +2,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Convention;
|
||||
using UnityEngine;
|
||||
using System;
|
||||
|
||||
namespace Demo.Game
|
||||
{
|
||||
@@ -29,9 +30,23 @@ namespace Demo.Game
|
||||
[Convention.RScript.Variable.Attr.Method]
|
||||
public float At(int index)
|
||||
{
|
||||
if (index < 0)
|
||||
index = Datas.Count + index;
|
||||
if (index < 0 || index >= Datas.Count)
|
||||
throw new IndexOutOfRangeException($"{index} is out of [0, {Datas.Count})");
|
||||
return Datas[index];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <20><>ȡ<EFBFBD><C8A1><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD>
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Convention.RScript.Variable.Attr.Method]
|
||||
public int GetCount()
|
||||
{
|
||||
return Datas.Count;
|
||||
}
|
||||
|
||||
public IEnumerator<float> GetEnumerator()
|
||||
{
|
||||
return ((IEnumerable<float>)Datas).GetEnumerator();
|
||||
|
||||
Reference in New Issue
Block a user