private AudioSource AddVehicleGrabSound() { var source = gameObject.AddComponent <AudioSource>(); source.volume = ECCHelpers.GetECCVolume() * 0.75f; source.minDistance = 5f; source.maxDistance = 20f; source.spatialBlend = 1f; return(source); }
void Start() { clawObject = gameObject.SearchChild(colliderName); OnTouch onTouch = clawObject.GetComponent <OnTouch>(); onTouch.onTouch = new OnTouch.OnTouchEvent(); onTouch.onTouch.AddListener(OnTouch); source = clawObject.AddComponent <AudioSource>(); source.volume = ECCHelpers.GetECCVolume(); source.spatialBlend = 1f; source.minDistance = 3f; source.maxDistance = 20f; clipPool = ECCAudio.CreateClipPool("GulperClawAttack"); }
void Start() { attackSource = gameObject.AddComponent <AudioSource>(); attackSource.minDistance = 2f; attackSource.maxDistance = 11f; attackSource.spatialBlend = 1f; attackSource.volume = ECCHelpers.GetECCVolume(); biteClipPool = ECCAudio.CreateClipPool("TwisteelBite"); cinematicClipPool = ECCAudio.CreateClipPool("TwisteelCin"); gameObject.SearchChild("Head").EnsureComponent <OnTouch>().onTouch = new OnTouch.OnTouchEvent(); gameObject.SearchChild("Head").EnsureComponent <OnTouch>().onTouch.AddListener(OnTouch); playerDeathCinematic = gameObject.AddComponent <PlayerCinematicController>(); playerDeathCinematic.animatedTransform = gameObject.SearchChild("PlayerCam").transform; playerDeathCinematic.animator = creature.GetAnimator(); playerDeathCinematic.animParamReceivers = new GameObject[0]; }
void Start() { attackSource = gameObject.AddComponent <AudioSource>(); attackSource.minDistance = 10f; attackSource.maxDistance = 40f; attackSource.spatialBlend = 1f; attackSource.volume = ECCHelpers.GetECCVolume(); clipPool = ECCAudio.CreateClipPool("GulperAttack"); gameObject.SearchChild("Mouth").GetComponent <OnTouch>().onTouch = new OnTouch.OnTouchEvent(); gameObject.SearchChild("Mouth").GetComponent <OnTouch>().onTouch.AddListener(OnTouch); playerDeathCinematic = gameObject.AddComponent <PlayerCinematicController>(); playerDeathCinematic.animatedTransform = gameObject.SearchChild("PlayerCam").transform; playerDeathCinematic.animator = creature.GetAnimator(); playerDeathCinematic.animParamReceivers = new GameObject[0]; throat = gameObject.SearchChild("Throat").transform; }