Daily upload on 20221019.
This commit is contained in:
@@ -137,9 +137,35 @@ namespace StgSharp_Entity
|
||||
{
|
||||
}
|
||||
|
||||
public void ChangeVelocity()
|
||||
/// <summary>
|
||||
/// 修改自身路径,修改条件由外部逻辑判断触发
|
||||
/// </summary>
|
||||
public void ChangeVelocity(float[] newXSpeed,float[] newYSpeed)
|
||||
{
|
||||
|
||||
if (newXSpeed != null)
|
||||
{
|
||||
if (newXSpeed.Length == 10)
|
||||
{
|
||||
this._xVelocity = newXSpeed;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception("The amount of parameters should be 10!");
|
||||
}
|
||||
}
|
||||
if (newYSpeed != null)
|
||||
{
|
||||
if (newYSpeed.Length == 10)
|
||||
{
|
||||
this._yVelocity = newYSpeed;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception("The amount of parameters should be 10!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user