private void Awake() { beam = GetComponent <MiningBeam>(); beam.OnActivation += Beam_OnActivation; beam.OnDeactivation += Beam_OnDeactivation; startAudio = audio.volume; audio.volume = 0f; }
private void Awake() { miningBeam = GetComponent <MiningBeam>(); miningBeam.OnActivation += MiningBeam_OnActivation; miningBeam.OnDeactivation += MiningBeam_OnDeactivation; miningBeam.OnRunning += MiningBeam_OnRunning; beamFX = Instantiate(beamFX, transform); fxEmission = targetParticleFX.emission; fxEmission.enabled = false; beamFX.sortingLayerName = "Ships"; beamFX.sortingOrder = -1; }