protected virtual void Start() { if (Thruster == null) { Thruster = GetComponentInParent <SgtThruster>(); } }
public static SgtThrusterFlare Create(SgtThruster thruster) { var flare = SgtComponentPool<SgtThrusterFlare>.Pop("Flare", thruster.gameObject.layer, thruster.transform); flare.Thruster = thruster; return flare; }
public static SgtThrusterFlare Create(SgtThruster thruster) { var flare = SgtComponentPool <SgtThrusterFlare> .Pop("Flare", thruster.gameObject.layer, thruster.transform); flare.Thruster = thruster; return(flare); }
public static SgtThrusterFlame Create(SgtThruster thruster) { var flame = SgtComponentPool<SgtThrusterFlame>.Pop("Flame", thruster.transform); flame.Thruster = thruster; return flame; }
public void Start() { _thruster = GetComponentInChildren <SgtThruster>(); _player = GetComponent <PlayerController>(); _body = GetComponent <Rigidbody>(); _audio = GetComponent <AudioSource>(); // Set default throttle _thruster.Throttle = Settings.DefaultThrottle; // Rotation controls _rotationController = new PIDController(Settings.Rotation); //_rotationController = new VectorPIDController(Settings.Rotation); _angularVelocityDampener = new PIDController3D(Settings.AVDampener); }