Space-Smash-Out/Assets/ScriptableObjects/BaseShipProperties.cs

63 lines
3.1 KiB
C#

using System.Collections.Generic;
using log4net.Config;
using ShipHandling;
using UnityEngine;
/// <summary>
/// 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.
/// </summary>
[CreateAssetMenu(fileName = "BaseShip", menuName = "ScriptableObjects/BaseShip")]
public class BaseShipProperties : ScriptableObject
{
[Header("Basic Movement")]
[Tooltip("The acceleration applied on thrust input.")]
public float thrustAcceleration = 2000;
[Tooltip("The velocity with which the character can rotate around it's center.")]
public float steerVelocity = 360;
[Header("Max Velocity & Drag")]
[Tooltip("The standard limit of character velocity.")]
public float normalMaxVelocity = 15f;
[Tooltip("The absolute maximum of character velocity (enforced by drag).")]
public float absolutMaxVelocity = 25f;
[Tooltip("The drag which acts opposite to the characters movement direction normally.")]
public float normalDrag = 5f;
[Tooltip("The maximum drag which can act opposite to the characters movement direction.")]
public float maximumDrag = 10f;
[Tooltip("The drag which acts opposite to the characters rotation direction normally.")]
public float torqueDrag = 0.2f;
[Header("Anti-Drift")]
[Tooltip("The amount to which the drift of the character is reduced when anti-drift is active.")]
public float antiDriftAmount = 12;
[Tooltip("The amount to which the drift of the character is always reduced.")]
public float minAntiDriftFactor = 0.03f;
[Header("Boost")]
[Tooltip("The time which is used up when a player uses boost.")]
public float maxBoostCapacity = 3.3f;
[Tooltip("The point at which a player can boost again when boost is reloading.")]
public float minBoostCapacity = 0.15f;
[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.0f;
[Tooltip("The factor of gravity which is eliminated by boosting (1 = no gravity).")]
public float boostAntiGravityFactor = 0.33f;
[Header("Stun & Tackle")]
[Tooltip("The factor by which the player looses control over the character when being stunned (0 = no control).")]
public float stunLooseControlFactor = 0.1f;
[Tooltip("Time until the tackling player can be tackled again")]
public float tacklingGraceTime = 0.6f;
[Tooltip("Time until the tackled player can be tackled again")]
public float tackledGraceTime = 0.6f;
[Tooltip("The time it takes for a critically stunned character to be controlable again.")]
public float tackledCriticalStunTime = 0.6f;
[Tooltip("The time it takes for a normally stunned character to be controlable again.")]
public float tackledBodyStunTime = 0.3f;
[Tooltip("The power with which the character is tackled away, when hit critically.")]
public float criticalTacklePowerFactor = 60f;
[Tooltip("The power with which the character is tackled away, when hit normally.")]
public float normalTacklePowerFactor = 40f;
[Header("Ship sounds")]
public ShipAudio audio;
}