using System.Collections; using System.Collections.Generic; using ShipHandling; using Unity.VisualScripting; using UnityEditor.EditorTools; using UnityEngine; /// /// Contains everything what makes a ship a ship, from the ship actor/3D-Model prefab to all the /// properties which are unique to it's controls and behavior. /// [CreateAssetMenu(fileName = "Ship", menuName = "ScriptableObjects/Ship", order = 2)] public class ShipProperties : ScriptableObject { [Tooltip("Prefab which contains the whole ship gameobject.")] public GameObject shipObject = null; [Tooltip("Object which relays the user input to the ships state.")] public ShipInputHandler shipInput = null; [Tooltip("Name of the ship (relevant to UI and lore context).")] public string shipName = "SpaceyMcShipface"; [Tooltip("The acceleration applied on thrust input.")] public float thrustAcceleration = 400; [Tooltip("The velocity with which the character can rotate around it's center.")] public float steerVelocity = 30; [Tooltip("The standard limit of character velocity.")] public float normalMaxVelocity = 10; [Tooltip("The absolute maximum of character velocity (enforced by drag).")] public float absolutMaxVelocity = 20; [Tooltip("The amount to which the drift of the character is reduced when anti-drift is active.")] public float antiDriftAmount = 20; [Tooltip("The amount to which the drift of the character is always reduced.")] public float minAntiDriftFactor = 0.2f; [Tooltip("The drag which acts opposite to the characters movement direction normally.")] public float normalDrag = 0.1f; [Tooltip("The maximum drag which can act opposite to the characters movement direction.")] public float maximumDrag = 0.3f; [Tooltip("The drag which acts opposite to the characters rotation direction normally.")] public float torqueDrag = 0.2f; [Tooltip("The time which is used up when a player uses boost.")] public float maxBoostCapacity = 2f; [Tooltip("The point at which a player can boost again when boost is reloading.")] public float minBoostCapacity = 0.3f; [Tooltip("The factor with which the thrust is multiplied while boosting.")] public float boostMagnitude = 1.5f; [Tooltip("The flat tax on the boost when outside of a recharging zone (capacity -= rate * time in seconds).")] public float outsideBoostRate = 0.5f; [Tooltip("The factor of gravity which is eliminated by boosting (1 = no gravity).")] public float boostAntiGravityFactor = 0.2f; [Tooltip("The factor by which the player looses control over the character when being stunned (0 = no control).")] public float stunLooseControlFactor = 0.1f; [Tooltip("The time it takes for a critically stunned character to be controlable again.")] public float tackleCriticalStunTime = 0.6f; [Tooltip("The time it takes for a normally stunned character to be controlable again.")] public float tackleBodyStunTime = 0.3f; [Tooltip("The power with which the character is tackled away, when hit critically.")] public float criticalTacklePowerFactor = 10f; [Tooltip("The power with which the character is tackled away, when hit normally.")] public float normalTacklePowerFactor = 10f; }