2020-05-31 17:07:22 +00:00
|
|
|
|
using System.Collections.Generic;
|
2021-07-18 04:03:43 +00:00
|
|
|
|
using SanAndreasUnity.Behaviours.World;
|
2020-05-31 17:07:22 +00:00
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace SanAndreasUnity.Behaviours
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public class PedManager : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
public static PedManager Instance { get; private set; }
|
|
|
|
|
|
|
|
|
|
public GameObject pedPrefab;
|
|
|
|
|
|
2019-06-22 23:48:57 +00:00
|
|
|
|
public float pedTurnSpeed = 10f;
|
2020-06-06 13:54:04 +00:00
|
|
|
|
|
2019-06-22 23:56:45 +00:00
|
|
|
|
public bool showPedSpeedometer = true;
|
2019-06-22 23:48:57 +00:00
|
|
|
|
|
2020-06-06 13:54:04 +00:00
|
|
|
|
public LayerMask groundFindingIgnoredLayerMask = 0;
|
|
|
|
|
|
2021-09-08 14:26:11 +00:00
|
|
|
|
public FocusPointParameters playerPedFocusPointParameters = new FocusPointParameters(false, 0f, 3f);
|
|
|
|
|
public FocusPointParameters npcPedFocusPointParameters = FocusPointParameters.Default;
|
2021-07-18 04:03:43 +00:00
|
|
|
|
|
2020-06-06 13:54:04 +00:00
|
|
|
|
[Header("Camera")]
|
|
|
|
|
|
2019-07-29 00:10:59 +00:00
|
|
|
|
public float cameraDistanceFromPed = 3f;
|
|
|
|
|
public float minCameraDistanceFromPed = 2f;
|
|
|
|
|
public float maxCameraDistanceFromPed = 30f;
|
|
|
|
|
|
2020-06-02 22:27:18 +00:00
|
|
|
|
public LayerMask cameraRaycastIgnoredLayerMask = 0;
|
|
|
|
|
|
2020-05-16 23:50:30 +00:00
|
|
|
|
[Header("Damage")]
|
|
|
|
|
|
2021-10-17 18:30:23 +00:00
|
|
|
|
[Range(0f, 10f)] public float pedDamageMultiplier = 1f;
|
2021-10-17 17:10:41 +00:00
|
|
|
|
|
2020-05-16 23:50:30 +00:00
|
|
|
|
public float legAndArmDamageMultiplier = 0.8f;
|
|
|
|
|
public float stomachAndChestDamageMultiplier = 1.0f;
|
|
|
|
|
public float headDamageMultiplier = 4.0f;
|
|
|
|
|
|
2020-05-18 23:00:24 +00:00
|
|
|
|
public float inflictedDamageMessageVelocityInScreenPerc = 0.2f;
|
|
|
|
|
public float inflictedDamageMessageLifetime = 1.0f;
|
|
|
|
|
public Color inflictedDamageMessageColor = Color.green;
|
|
|
|
|
|
2020-05-31 17:07:22 +00:00
|
|
|
|
[Header("Health bar")]
|
|
|
|
|
|
|
|
|
|
public bool displayHealthBarAbovePeds = false;
|
|
|
|
|
public float healthBarWorldWidth = 0.5f;
|
|
|
|
|
public float healthBarWorldHeight = 0.1f;
|
|
|
|
|
public float healthBarMaxScreenHeight = 20f;
|
|
|
|
|
public float healthBarVerticalOffset = 0.3f;
|
2020-04-22 21:26:55 +00:00
|
|
|
|
public Color healthColor = Color.red;
|
|
|
|
|
public Color healthBackgroundColor = (Color.red + Color.black) * 0.5f;
|
2020-05-31 17:07:22 +00:00
|
|
|
|
|
|
|
|
|
[Header("Ped AI")]
|
|
|
|
|
|
|
|
|
|
public float AIStoppingDistance = 3f;
|
|
|
|
|
public float AIVehicleEnterDistance = 1.25f;
|
|
|
|
|
|
2019-05-24 21:51:39 +00:00
|
|
|
|
[Header("Net")]
|
|
|
|
|
|
|
|
|
|
public float pedSyncRate = 10;
|
|
|
|
|
|
2021-01-03 13:23:18 +00:00
|
|
|
|
[Header("Ragdoll")]
|
|
|
|
|
|
2021-01-05 17:21:57 +00:00
|
|
|
|
public GameObject ragdollPrefab;
|
2021-01-03 13:23:18 +00:00
|
|
|
|
public float ragdollMass = 100f;
|
|
|
|
|
public float ragdollLifetime = 30f;
|
2021-01-04 00:28:58 +00:00
|
|
|
|
public float ragdollDrag = 0.05f;
|
|
|
|
|
public float ragdollMaxDepenetrationVelocity = 10f;
|
|
|
|
|
public float ragdollDamageForce = 4f;
|
2021-01-05 03:20:46 +00:00
|
|
|
|
public float ragdollDamageForceWhenDetached = 4f;
|
2021-01-04 21:11:55 +00:00
|
|
|
|
public CollisionDetectionMode ragdollCollisionDetectionMode = CollisionDetectionMode.Discrete;
|
2021-01-05 20:32:20 +00:00
|
|
|
|
[Range(1, 60)] public float ragdollSyncRate = 20f;
|
2021-01-07 20:02:12 +00:00
|
|
|
|
public RigidbodyInterpolation ragdollInterpolationMode = RigidbodyInterpolation.Extrapolate;
|
2021-01-03 13:23:18 +00:00
|
|
|
|
|
2020-05-31 17:07:22 +00:00
|
|
|
|
|
|
|
|
|
void Awake ()
|
|
|
|
|
{
|
|
|
|
|
Instance = this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|