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