mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-29 23:40:23 +00:00
81 lines
2.3 KiB
C#
81 lines
2.3 KiB
C#
using System.Collections.Generic;
|
|
using SanAndreasUnity.Behaviours.World;
|
|
using UnityEngine;
|
|
|
|
namespace SanAndreasUnity.Behaviours
|
|
{
|
|
|
|
public class PedManager : MonoBehaviour
|
|
{
|
|
public static PedManager Instance { get; private set; }
|
|
|
|
public GameObject pedPrefab;
|
|
|
|
public float pedTurnSpeed = 10f;
|
|
|
|
public bool showPedSpeedometer = true;
|
|
|
|
public LayerMask groundFindingIgnoredLayerMask = 0;
|
|
|
|
public FocusPointParameters playerPedFocusPointParameters = new FocusPointParameters(false, 0f, 3f);
|
|
public FocusPointParameters npcPedFocusPointParameters = FocusPointParameters.Default;
|
|
|
|
[Header("Camera")]
|
|
|
|
public float cameraDistanceFromPed = 3f;
|
|
public float minCameraDistanceFromPed = 2f;
|
|
public float maxCameraDistanceFromPed = 30f;
|
|
|
|
public LayerMask cameraRaycastIgnoredLayerMask = 0;
|
|
|
|
[Header("Damage")]
|
|
|
|
public float legAndArmDamageMultiplier = 0.8f;
|
|
public float stomachAndChestDamageMultiplier = 1.0f;
|
|
public float headDamageMultiplier = 4.0f;
|
|
|
|
public float inflictedDamageMessageVelocityInScreenPerc = 0.2f;
|
|
public float inflictedDamageMessageLifetime = 1.0f;
|
|
public Color inflictedDamageMessageColor = Color.green;
|
|
|
|
[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;
|
|
public Color healthColor = Color.red;
|
|
public Color healthBackgroundColor = (Color.red + Color.black) * 0.5f;
|
|
|
|
[Header("Ped AI")]
|
|
|
|
public float AIStoppingDistance = 3f;
|
|
public float AIVehicleEnterDistance = 1.25f;
|
|
|
|
[Header("Net")]
|
|
|
|
public float pedSyncRate = 10;
|
|
|
|
[Header("Ragdoll")]
|
|
|
|
public GameObject ragdollPrefab;
|
|
public float ragdollMass = 100f;
|
|
public float ragdollLifetime = 30f;
|
|
public float ragdollDrag = 0.05f;
|
|
public float ragdollMaxDepenetrationVelocity = 10f;
|
|
public float ragdollDamageForce = 4f;
|
|
public float ragdollDamageForceWhenDetached = 4f;
|
|
public CollisionDetectionMode ragdollCollisionDetectionMode = CollisionDetectionMode.Discrete;
|
|
[Range(1, 60)] public float ragdollSyncRate = 20f;
|
|
public RigidbodyInterpolation ragdollInterpolationMode = RigidbodyInterpolation.Extrapolate;
|
|
|
|
|
|
void Awake ()
|
|
{
|
|
Instance = this;
|
|
}
|
|
|
|
}
|
|
|
|
}
|