private void Awake() { // Set up the reference to the aeroplane controller. m_Plane = GetComponent <AeroplaneController>(); m_Rigidbody = GetComponent <Rigidbody>(); // Add the audiosources and get the references. m_EngineSoundSource = gameObject.AddComponent <AudioSource>(); m_EngineSoundSource.playOnAwake = false; m_WindSoundSource = gameObject.AddComponent <AudioSource>(); m_WindSoundSource.playOnAwake = false; // Assign clips to the audiosources. m_EngineSoundSource.clip = m_EngineSound; m_WindSoundSource.clip = m_WindSound; // Set the parameters of the audiosources. m_EngineSoundSource.minDistance = m_AdvancedSetttings.engineMinDistance; m_EngineSoundSource.maxDistance = m_AdvancedSetttings.engineMaxDistance; m_EngineSoundSource.loop = true; m_EngineSoundSource.dopplerLevel = m_AdvancedSetttings.engineDopplerLevel; m_WindSoundSource.minDistance = m_AdvancedSetttings.windMinDistance; m_WindSoundSource.maxDistance = m_AdvancedSetttings.windMaxDistance; m_WindSoundSource.loop = true; m_WindSoundSource.dopplerLevel = m_AdvancedSetttings.windDopplerLevel; // call update here to set the sounds pitch and volumes before they actually play Update(); // Start the sounds playing. m_EngineSoundSource.Play(); m_WindSoundSource.Play(); }
private void Awake() { // Set up the reference to the aeroplane controller. m_Plane = GetComponent<AeroplaneController>(); m_Rigidbody = GetComponent<Rigidbody>(); // Add the audiosources and get the references. m_EngineSoundSource = gameObject.AddComponent<AudioSource>(); m_EngineSoundSource.playOnAwake = false; m_WindSoundSource = gameObject.AddComponent<AudioSource>(); m_WindSoundSource.playOnAwake = false; // Assign clips to the audiosources. m_EngineSoundSource.clip = m_EngineSound; m_WindSoundSource.clip = m_WindSound; // Set the parameters of the audiosources. m_EngineSoundSource.minDistance = m_AdvancedSetttings.engineMinDistance; m_EngineSoundSource.maxDistance = m_AdvancedSetttings.engineMaxDistance; m_EngineSoundSource.loop = true; m_EngineSoundSource.dopplerLevel = m_AdvancedSetttings.engineDopplerLevel; m_WindSoundSource.minDistance = m_AdvancedSetttings.windMinDistance; m_WindSoundSource.maxDistance = m_AdvancedSetttings.windMaxDistance; m_WindSoundSource.loop = true; m_WindSoundSource.dopplerLevel = m_AdvancedSetttings.windDopplerLevel; // call update here to set the sounds pitch and volumes before they actually play Update(); // Start the sounds playing. m_EngineSoundSource.Play(); m_WindSoundSource.Play(); }
private void Awake() { // Set up the reference to the aeroplane controller. m_Aeroplane = GetComponent <AeroplaneController>(); inputController = new InputController(); inputController.Begin("192.168.43.49", 80); }
private void Awake() { // Set up the reference to the aeroplane controller. m_Aeroplane = GetComponent <AeroplaneController>(); asrc = GetComponent <AudioSource>(); currentBoostingTime = boostDuration; }
private bool m_TakenOff; // Has the plane taken off yet // setup script properties private void Awake() { // get the reference to the aeroplane controller, so we can send move input to it and read its current state. m_AeroplaneController = GetComponent <AeroplaneController>(); // pick a random perlin starting point for lateral wandering m_RandomPerlin = Random.Range(0f, 100f); }
private bool m_TakenOff; // Has the plane taken off yet // setup script properties private void Awake() { // get the reference to the aeroplane controller, so we can send move input to it and read its current state. m_AeroplaneController = GetComponent<AeroplaneController>(); // pick a random perlin starting point for lateral wandering m_RandomPerlin = Random.Range(0f, 100f); }
private void Awake() { // Set up the reference to the aeroplane controller. m_Aeroplane = GetComponent <AeroplaneController>(); if (GameInputController.Instance().GetDevice() != null) { m_Aeroplane.isJoystick = true; } }
private AeroplaneController m_Plane; // Reference to the aeroplane controller. private void Start() { // Get the reference to the aeroplane controller. m_Plane = GetComponent<AeroplaneController>(); // Store the original local rotation of each surface, so we can rotate relative to this foreach (var surface in m_ControlSurfaces) { surface.originalLocalRotation = surface.transform.localRotation; } }
private void Awake() { // Set up the reference to the aeroplane controller. m_Plane = GetComponent <AeroplaneController>(); m_PropellorModelRenderer = m_PropellorModel.GetComponent <Renderer>(); m_PropellorBlurRenderer = m_PropellorBlur.GetComponent <Renderer>(); // Set the propellor blur gameobject's parent to be the propellor. m_PropellorBlur.parent = m_PropellorModel; }
private AeroplaneController m_Plane; // Reference to the aeroplane controller. private void Start() { // Get the reference to the aeroplane controller. m_Plane = GetComponent <AeroplaneController>(); // Store the original local rotation of each surface, so we can rotate relative to this foreach (ControlSurface surface in m_ControlSurfaces) { surface.originalLocalRotation = surface.transform.localRotation; } }
private void Awake() { // Set up the reference to the aeroplane controller. m_Plane = GetComponent<AeroplaneController>(); m_PropellorModelRenderer = m_PropellorModel.GetComponent<Renderer>(); m_PropellorBlurRenderer = m_PropellorBlur.GetComponent<Renderer>(); // Set the propellor blur gameobject's parent to be the propellor. m_PropellorBlur.parent = m_PropellorModel; }
private Color m_OriginalStartColor; // The original starting colout of the particle system // Use this for initialization private void Start() { // get the aeroplane from the object hierarchy m_Jet = FindAeroplaneParent(); // get the particle system ( it will be on the object as we have a require component set up m_System = GetComponent<ParticleSystem>(); // set the original properties from the particle system m_OriginalLifetime = m_System.startLifetime; m_OriginalStartSize = m_System.startSize; m_OriginalStartColor = m_System.startColor; }
private Color m_OriginalStartColor; // The original starting colout of the particle system // Use this for initialization private void Start() { // get the aeroplane from the object hierarchy m_Jet = FindAeroplaneParent(); // get the particle system ( it will be on the object as we have a require component set up m_System = GetComponent <ParticleSystem>(); // set the original properties from the particle system m_OriginalLifetime = m_System.main.startLifetime.constant; m_OriginalStartSize = m_System.main.startSize.constant; m_OriginalStartColor = m_System.main.startColor.color; }
//private Renderer m_PropellorModelRenderer_2; // private Renderer m_PropellorBlurRenderer_2; // private Renderer m_PropellorModelRenderer_3; // private Renderer m_PropellorBlurRenderer_3; // private Renderer m_PropellorModelRenderer_4; // private Renderer m_PropellorBlurRenderer_4; private void Awake() { // Set up the reference to the aeroplane controller. m_Plane = GetComponent <AeroplaneController>(); m_PropellorModelRenderer_1 = m_PropellerModel_1.GetComponent <Renderer>(); m_PropellorBlurRenderer_1 = m_PropellerBlur_1.GetComponent <Renderer>(); // m_PropellorModelRenderer_2 = m_PropellerModel_2.GetComponent<Renderer>(); //m_PropellorBlurRenderer_2 = m_PropellerBlur_2.GetComponent<Renderer>(); // m_PropellorModelRenderer_3 = m_PropellerModel_3.GetComponent<Renderer>(); // m_PropellorBlurRenderer_3 = m_PropellerBlur_3.GetComponent<Renderer>(); // m_PropellorModelRenderer_4 = m_PropellerModel_4.GetComponent<Renderer>(); // m_PropellorBlurRenderer_4 = m_PropellerBlur_4.GetComponent<Renderer>(); // Set the propellor blur gameobject's parent to be the propellor. m_PropellerBlur_1.parent = m_PropellerModel_1; // m_PropellerBlur_2.parent = m_PropellerModel_2; //m_PropellerBlur_3.parent = m_PropellerModel_3; //m_PropellerBlur_4.parent = m_PropellerModel_4; }
private void Awake() { // Set up the reference to the aeroplane controller. m_Aeroplane = GetComponent <AeroplaneController>(); }
// Use this for initialization private void Start() { m_Plane = GetComponent <AeroplaneController>(); m_Animator = GetComponent <Animator>(); m_Rigidbody = GetComponent <Rigidbody>(); }
private void Awake() { m_AeroplaneController = GetComponent<AeroplaneController>(); m_RandomPerlin = Random.Range(0f, 100f); // pick a random perlin starting point for lateral wandering }
private void Awake() { // Set up the reference to the aeroplane controller. m_Aeroplane = GetComponent<AeroplaneController>(); }
private void Start() { test = Camera.main.GetComponent <PostProcessingBehaviour>(); chicken = GetComponent <AeroplaneController>(); //postProcess = Camera.main.GetComponent<PostProcessingBehaviour>(); }
// Use this for initialization private void Start() { m_Plane = GetComponent<AeroplaneController>(); m_Animator = GetComponent<Animator>(); m_Rigidbody = GetComponent<Rigidbody>(); }
private void Start() { m_Aeroplane = GetComponent <AeroplaneController>(); _netMqListener = new NetMqListener(HandleMessageCar); _netMqListener.Start(); }
private void Awake() { m_Aeroplane = GetComponent <UnityStandardAssets.Vehicles.Aeroplane.AeroplaneController>(); }
// Use this for initialization void Start() { m_Player = GameObject.FindGameObjectWithTag("Player").transform; m_Aeroplane = GetComponent <UnityStandardAssets.Vehicles.Aeroplane.AeroplaneController>(); }