// Set the speed of the bullet that was just shot private void setBulletSpeed(GameObject bullet, float speed) { linear_travel LT = bullet.GetComponentInChildren <linear_travel> (); if (LT != null) { LT.setSpeed(speed); return; } // seeking_missile starts with 0 velocity // sin_travel starts with fixed velocity }