用鼠标左右拖动即可看到效果
void Update()
{
time = Time.time;
AnimToEnd (20f);
if (_anim)
{
CurrentV = Time.deltaTime * _anim_speed * Vk;
VT = Vtotal CurrentV;
if (Vk > 0 && VT >= AddV) { _anim = false; CurrentV = AddV - Vtotal; }
if (Vk < 0 && VT <= AddV) { _anim = false; CurrentV = AddV - Vtotal; }
//==============
for (int i = 0; i < Items.Count; i )
{
Items[i].Drag(CurrentV);
if(Items[i].v-0.5<0.05f)
{
Current = Items[i];
}
}
Check(CurrentV);
Vtotal = VT;
if(!_anim)
{
if (MoveEnd != null) { MoveEnd(Current); }
}
}
}
评论