mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-23 04:23:04 +00:00
Move "turn speed" setting to PedManager
This commit is contained in:
parent
9fbd976388
commit
b4fa58650f
3 changed files with 6 additions and 4 deletions
|
@ -479,7 +479,7 @@ namespace SanAndreasUnity.Behaviours
|
|||
{
|
||||
|
||||
// rotate player towards his heading
|
||||
Vector3 forward = Vector3.RotateTowards (this.transform.forward, Heading, TurnSpeed * Time.deltaTime, 0.0f);
|
||||
Vector3 forward = Vector3.RotateTowards (this.transform.forward, Heading, PedManager.Instance.pedTurnSpeed * Time.deltaTime, 0.0f);
|
||||
this.transform.rotation = Quaternion.LookRotation(forward);
|
||||
|
||||
}
|
||||
|
|
|
@ -10,6 +10,8 @@ namespace SanAndreasUnity.Behaviours
|
|||
|
||||
public GameObject pedPrefab;
|
||||
|
||||
public float pedTurnSpeed = 10f;
|
||||
|
||||
[Header("Health bar")]
|
||||
|
||||
public bool displayHealthBarAbovePeds = false;
|
||||
|
|
|
@ -11,9 +11,9 @@ namespace SanAndreasUnity.Settings {
|
|||
description = "Turn speed",
|
||||
minValue = 3,
|
||||
maxValue = 30,
|
||||
isAvailable = () => Ped.Instance != null,
|
||||
getValue = () => Ped.Instance.TurnSpeed,
|
||||
setValue = (value) => { Ped.Instance.TurnSpeed = value; },
|
||||
isAvailable = () => PedManager.Instance != null,
|
||||
getValue = () => PedManager.Instance.pedTurnSpeed,
|
||||
setValue = (value) => { PedManager.Instance.pedTurnSpeed = value; },
|
||||
};
|
||||
OptionsWindow.FloatInput m_enterVehicleRadiusInput = new OptionsWindow.FloatInput() {
|
||||
description = "Enter vehicle radius",
|
||||
|
|
Loading…
Reference in a new issue