// Use this for initialization void Start() { fireScript = GetComponent <BulletFireScript>(); controller = GetComponentInParent <CannonController>(); swivelRangeDegrees = controller.SwivelRangeDegrees; aimingRangeDegrees = controller.AimingRangeDegrees; }
/// <summary> /// Initialises the script /// </summary> void Start() { m_fireScript = GetComponent <BulletFireScript>(); //TODO: figure out if cannons need to know about their cannon controller. m_controller = GetComponentInParent <CannonController>(); m_swivelRangeDegrees = m_controller.SwivelRangeDegrees; }
/// <summary> /// Initialises the script /// </summary> void Start() { m_fireScript = GetComponent<BulletFireScript>(); //TODO: figure out if cannons need to know about their cannon controller. m_controller = GetComponentInParent<CannonController>(); m_swivelRangeDegrees = m_controller.SwivelRangeDegrees; }