Removed horse acceleration, fixed speed will change with difficulty

posted in: Weekly Progress | 0

Fixed speed of horse is initialized at the top of the script.

private float _fixedSpeed;

CurrentSpeed is replaced with fixedspeed.

_fixedSpeed = StartSpeed;

 

After Start function PlayerOffset function is added.

 

public void SetXOffset(float playerSpeed)
{
if (playerSpeed > 20 && playerSpeed < 40)
{
XOffset = 20;
}
else if (playerSpeed > 40)
{
XOffset = 30;
}
}

Leave a Reply