public CourseCorrection(GameObject gameObject, float radiusOffset) { this.gameObject = gameObject; this.origin = gameObject.GetComponent <Rigidbody>().transform.position; this.radiusOffset = radiusOffset; this.avoidanceType = AvoidanceType.Unknown; this.vehicleType = Vehicle.Type.None; this.obstacleType = Obstacle.Type.None; this.weaponType = Weapon.Type.None; }
// Start is called before the first frame update void Start() { AudioSource = gameObject.GetComponent <AudioSource>(); ObstacleType = gameObject.GetComponent <Obstacle>().GetObstacleType(); }