Exemple #1
0
 // Start is called before the first frame update
 void Start()
 {
     _movement            = GetComponentInChildren <AircraftMovement>();
     _textureManager      = GetComponent <AircraftTextureManager>();
     _aircraftAudioSource = gameObject.AddComponent <AudioSource>();
     timeControl          = FindObjectOfType <TimeControl>();
 }
Exemple #2
0
 public void Start()
 {
     _textureManager = transform.root.GetComponent <AircraftTextureManager>();
     if (_trail == null)
     {
         _trail = gameObject.AddComponent <TrailRenderer>();
         _trail.widthMultiplier = .25f;
         _trail.material        = _textureManager.TrailMaterial;
         _trail.time            = 0.3f;
         _trail.endColor        = new Color(0, 0, 0, 0);
         _trail.startColor      = _textureManager.TrailColor;
     }
 }