Example #1
0
 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;
    }
Example #3
0
    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;
    }
Example #5
0
        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);
        }