private void Awake() { parentLamp = transform.parent.GetComponent <Lamp>(); fixingCable = gameObject.GetComponent <ChargingCable>(); //Inputs input = new Controls(); input.Interactions.SetCallbacks(this); input.Enable(); audioSource = gameObject.GetComponent <AudioSource>(); if (audioSource) { Sound sound = AudioManager.instance.GetSound("DeployCableSFX"); audioSource.clip = sound.clip; audioSource.volume = sound.volume; audioSource.pitch = sound.pitch; } }
private void Awake() { chargeCable = gameObject.GetComponentInChildren <ChargingCable>(); }