All ships now have their own properties, which are modifiers for the base ship properties. The base behaviour of all ships can now be easily changed, while the individual differences are still respected. Ship states now trigger particle emissions & effects. This is still messy and mixed with sounds. Will be overhauled once ship state machine is introduced. To calculate gravity you now need to specify the gravity source transform.
20 lines
457 B
C#
20 lines
457 B
C#
using UnityEngine;
|
|
|
|
namespace ShipHandling
|
|
{
|
|
/// <summary>
|
|
/// Variables for the ship which can also be under the players control.
|
|
/// </summary>
|
|
public class ShipState
|
|
{
|
|
public float thrustInput = 0;
|
|
public float boostInput = 0;
|
|
public float boostCapacity;
|
|
// Saves the current input for steering
|
|
public float steerInput = 0;
|
|
public Vector3 currentGravity = new Vector3();
|
|
public bool IsFrozen = false;
|
|
public bool reset = false;
|
|
}
|
|
}
|