You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
2.4 KiB
C#

3 weeks ago
//Shady
using Fusion;
using UnityEngine;
using Sirenix.OdinInspector;
[HideLabel]
[System.Serializable]
public class MovementSettings
{
[Title("Movement Settings")]
[SerializeField] public float MoveSpeed = 4f;
[SerializeField] public float SprintSpeed = 9f;
[Range(0f, 1f)]
[SerializeField] public float RotationSmooth = 0.1f;
[SerializeField] public float JumpImpulsePeak = 8f;
[SerializeField] public float UpGravity = -25f;
[SerializeField] public float DownGravity = -40f;
[SerializeField] public float GroundAcceleration = 10f;
[SerializeField] public float GroundDeceleration = 15f;
[SerializeField] public float AirAcceleration = -25f;
[SerializeField] public float AirDeceleration = -25f;
}//class end
[HideLabel]
[System.Serializable]
public class MovementData
{
// [Title("Movement Settings")]
// [SerializeField] public float MoveSpeed = 4f;
// [SerializeField] public float SprintSpeed = 9f;
// [Range(0f, 1f)]
// [SerializeField] public float RotationSmooth = 0.1f;
// [SerializeField] public float JumpImpulsePeak = 8f;
// [SerializeField] public float UpGravity = -25f;
// [SerializeField] public float DownGravity = -40f;
// [SerializeField] public float GroundAcceleration = 10f;
// [SerializeField] public float GroundDeceleration = 15f;
// [SerializeField] public float AirAcceleration = -25f;
// [SerializeField] public float AirDeceleration = -25f;
// [SerializeField] public MovementSettings MovementSettings = new();
[HideInInspector] public GameObject MainCamera = null;
[HideInInspector] public float Speed = 0f;
[HideInInspector] public float TargetSpeed = 0f;
[HideInInspector] public float MovementSpeed = 0f;
[HideInInspector] public float RotationVelocity = 0f;
[HideInInspector] public float TargetRotation = 0f;
[HideInInspector] public float TargetRotationMove = 0f;
[HideInInspector] public float Acceleration = 0f;
[HideInInspector] public Vector3 InputDirection = Vector3.zero;
[HideInInspector] public float JumpImpulse = 0f;
[HideInInspector] public Vector3 DesiredMoveVelocity = Vector3.zero;
[Networked]
[HideInInspector] public Vector3 MoveVelocity { get; set; }
}//class end