public RocketController FireRocket(ShipController sc) { // Show fire anim List <Vector3> rocketPath = new List <Vector3> { this.transform.position, this.rocketAimPoint.position, }; rocket = Instantiate(RocketPrefab, shipGun.position, transform.rotation) as GameObject; RocketController r = rocket.GetComponent <RocketController>(); r.SetCourse(rocketPath, sc.transform, sc.visualHolder.transform, this); if (playerController != null && playerController.GetSelectedObject() == this.gameObject) { playerController.UpdateInfoUI(); } return(r); }