mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2025-02-17 05:18:27 +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
|
// 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);
|
this.transform.rotation = Quaternion.LookRotation(forward);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,8 @@ namespace SanAndreasUnity.Behaviours
|
||||||
|
|
||||||
public GameObject pedPrefab;
|
public GameObject pedPrefab;
|
||||||
|
|
||||||
|
public float pedTurnSpeed = 10f;
|
||||||
|
|
||||||
[Header("Health bar")]
|
[Header("Health bar")]
|
||||||
|
|
||||||
public bool displayHealthBarAbovePeds = false;
|
public bool displayHealthBarAbovePeds = false;
|
||||||
|
|
|
@ -11,9 +11,9 @@ namespace SanAndreasUnity.Settings {
|
||||||
description = "Turn speed",
|
description = "Turn speed",
|
||||||
minValue = 3,
|
minValue = 3,
|
||||||
maxValue = 30,
|
maxValue = 30,
|
||||||
isAvailable = () => Ped.Instance != null,
|
isAvailable = () => PedManager.Instance != null,
|
||||||
getValue = () => Ped.Instance.TurnSpeed,
|
getValue = () => PedManager.Instance.pedTurnSpeed,
|
||||||
setValue = (value) => { Ped.Instance.TurnSpeed = value; },
|
setValue = (value) => { PedManager.Instance.pedTurnSpeed = value; },
|
||||||
};
|
};
|
||||||
OptionsWindow.FloatInput m_enterVehicleRadiusInput = new OptionsWindow.FloatInput() {
|
OptionsWindow.FloatInput m_enterVehicleRadiusInput = new OptionsWindow.FloatInput() {
|
||||||
description = "Enter vehicle radius",
|
description = "Enter vehicle radius",
|
||||||
|
|
Loading…
Add table
Reference in a new issue