void AddAuxSend(Entity in_AuxSendObject) { AkAuxSend AuxSend = in_AuxSendObject.Get <AkAuxSend>(); if (AuxSend != null) { m_activeAuxSends.Add(AuxSend); m_auxSendValues = null; UpdateAuxSend(); } }
//When exiting an AuxSendironment, remove it from active AuxSendironments void OnTriggerExit(Collider other) { AkAuxSend AuxSend = (AkAuxSend)other.gameObject.GetComponent("AkAuxSend"); if (AuxSend != null) { m_activeAuxSends.Remove(AuxSend); m_auxSendValues = null; UpdateAuxSend(); } }
void AddAuxSend(GameObject in_AuxSendObject) { AkAuxSend AuxSend = (AkAuxSend)in_AuxSendObject.GetComponent("AkAuxSend"); if (AuxSend != null) { m_activeAuxSends.Add(AuxSend); m_auxSendValues = null; UpdateAuxSend(); } }
//When starting, check if any of our parent objects have the AkAuxSend component. //We'll assume that this object is then affected by the same AuxSendironment setting. public override void Awake() { base.Awake(); this.Serialize = false; this.transform = this.Entity.Get <Transform>(); //When entering an AuxSendironment, add it to the list of active AuxSendironments this.OnEnter.Action = this.AddAuxSend; //When exiting an AuxSendironment, remove it from active AuxSendironments this.OnExit.Action = delegate(Entity other) { AkAuxSend AuxSend = other.Get <AkAuxSend>(); if (AuxSend != null) { m_activeAuxSends.Remove(AuxSend); m_auxSendValues = null; UpdateAuxSend(); } }; this.AddAuxSend(this.Entity); }