引擎修改
This commit is contained in:
@@ -43,6 +43,24 @@ namespace AibisDream
|
||||
UpdateSpeed();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 初始化速度
|
||||
/// </summary>
|
||||
/// <param name="initSpeed">初始速度</param>
|
||||
public void StartRotate(float initSpeed)
|
||||
{
|
||||
_vertexArray[_rootIdx].speed = initSpeed;
|
||||
UpdateSpeed();
|
||||
}
|
||||
|
||||
public void Accelerate(float originSpeed, float speed)
|
||||
{
|
||||
foreach (var shaft in _vertexArray)
|
||||
{
|
||||
if (shaft.HasChildGear()) shaft.UpdateSpeedScale(speed);
|
||||
}
|
||||
}
|
||||
|
||||
private int FindDriverIdx()
|
||||
{
|
||||
for (int i = 0; i < _vertexSize; i++)
|
||||
@@ -261,17 +279,5 @@ namespace AibisDream
|
||||
|
||||
return isShaftAvailable;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 通过引擎系统加速
|
||||
/// </summary>
|
||||
/// <param name="curSpeed">当前速度</param>
|
||||
private void Accelerate(float curSpeed)
|
||||
{
|
||||
foreach (var shaft in _vertexArray)
|
||||
{
|
||||
if (shaft.HasChildGear()) shaft.UpdateSpeedScale(1 + curSpeed);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user