SetRTPCValueByPlayingID() public static method

public static SetRTPCValueByPlayingID ( string in_pszRtpcName, float in_value, uint in_playingID ) : AKRESULT
in_pszRtpcName string
in_value float
in_playingID uint
return AKRESULT
Ejemplo n.º 1
0
        public override void FixedUpdate()
        {
            base.FixedUpdate();
            var healthComponent = base.healthComponent;
            var currentEnergy   = healthComponent.barrier + healthComponent.shield;
            var charge          = (this.initialEnergy > 0f) ? Mathf.Clamp01((this.initialEnergy - currentEnergy) / this.initialEnergy): 0f;

            AkSoundEngine.SetRTPCValueByPlayingID("loaderShift_chargeAmount", charge * 100f, this.chargeLoopSFX);
            if (NetworkServer.active && spiralEnergyComponent && base.healthComponent.fullCombinedHealth > 0f)
            {
                if (currentEnergy < previousEnergy)
                {
                    CorrectSpiralEnergy(previousEnergy - currentEnergy);
                }
                if (currentEnergy > 0)
                {
                    ConvertSpiralEnergy();
                }
            }
            if (base.isAuthority && (currentEnergy <= 0f || !base.IsKeyDownAuthority()))
            {
                this.outer.SetNextStateToMain();
                return;
            }
        }
Ejemplo n.º 2
0
        internal static void PlayFire(GameObject source, Single chargeLevel, FireType fireType)
        {
            UInt32 id = AkSoundEngine.PostEvent(fireType.GetSound(), source);

            _ = AkSoundEngine.SetRTPCValueByPlayingID(Sounds.Sniper_Charge_Amount.ID(), chargeLevel * 100f, id);
            _ = AkSoundEngine.SetRTPCValueByPlayingID(Sounds.Sniper_Volume_ALL.ID(), ConfigModule.sfxVolume, id);
            _ = AkSoundEngine.SetRTPCValueByPlayingID(Sounds.Sniper_Volume_SHOTS.ID(), ConfigModule.shotsVolume, id);
        }
 // Token: 0x06001E96 RID: 7830 RVA: 0x000840CC File Offset: 0x000822CC
 private void FixedUpdate()
 {
     if (this.ropeEndTransform)
     {
         float in_value = Util.Remap((this.ropeEndTransform.transform.position - base.transform.position).magnitude, this.minHookDistancePitchModifier, this.maxHookDistancePitchModifier, 0f, 100f);
         AkSoundEngine.SetRTPCValueByPlayingID(this.hookDistanceRTPCstring, in_value, this.soundID);
     }
 }
Ejemplo n.º 4
0
        // Token: 0x06001C27 RID: 7207 RVA: 0x0008355C File Offset: 0x0008175C
        public static uint PlaySound(string soundString, GameObject gameObject, string RTPCstring, float RTPCvalue)
        {
            uint num = Util.PlaySound(soundString, gameObject);

            if (num != 0u)
            {
                AkSoundEngine.SetRTPCValueByPlayingID(RTPCstring, RTPCvalue, num);
            }
            return(num);
        }
Ejemplo n.º 5
0
        // Token: 0x06001C28 RID: 7208 RVA: 0x00083580 File Offset: 0x00081780
        public static uint PlayScaledSound(string soundString, GameObject gameObject, float playbackRate)
        {
            uint num = Util.PlaySound(soundString, gameObject);

            if (num != 0u)
            {
                float num2     = Mathf.Log(playbackRate, 2f);
                float in_value = 1200f * num2 / 96f + 50f;
                AkSoundEngine.SetRTPCValueByPlayingID("attackSpeed", in_value, num);
            }
            return(num);
        }
 // Token: 0x06003073 RID: 12403 RVA: 0x000D0D5C File Offset: 0x000CEF5C
 public override void FixedUpdate()
 {
     base.FixedUpdate();
     this.totalStopwatch += Time.fixedDeltaTime;
     this.stopwatch      += Time.fixedDeltaTime;
     AkSoundEngine.SetRTPCValueByPlayingID(GoldGatFire.windUpRTPC, Mathf.InverseLerp(GoldGatFire.minFireFrequency, GoldGatFire.maxFireFrequency, this.fireFrequency) * 100f, this.loopSoundID);
     if (base.CheckReturnToIdle())
     {
         return;
     }
     if (this.stopwatch > 1f / this.fireFrequency)
     {
         this.stopwatch = 0f;
         this.FireBullet();
     }
 }
Ejemplo n.º 7
0
        public override void FixedUpdate()
        {
            base.FixedUpdate();
            this.totalStopwatch += Time.fixedDeltaTime;
            this.stopwatch      += Time.fixedDeltaTime;
            AkSoundEngine.SetRTPCValueByPlayingID(GoldGatFire.windUpRTPC, Mathf.InverseLerp(GoldGatFire.minFireFrequency, GoldGatFire.maxFireFrequency, this.fireFrequency) * 100f, this.loopSoundID);

            if (this.stopwatch > 1f / this.fireFrequency)
            {
                this.stopwatch = 0f;
                this.FireBullet();
            }
            if (base.isAuthority && base.fixedAge >= maxDuration)
            {
                this.outer.SetNextStateToMain();
                return;
            }
        }
Ejemplo n.º 8
0
        public override void FixedUpdate()
        {
            base.FixedUpdate();
            var stock            = base.activatorSkillSlot.stock;
            var maxStock         = base.activatorSkillSlot.maxStock;
            var percentUsedStock = ((maxStock > 0f) ? Mathf.Clamp01((maxStock - stock) / maxStock) : 0f) * 100f;

            AkSoundEngine.SetRTPCValueByPlayingID("loaderShift_chargeAmount", percentUsedStock, this.chargeLoopSFX);
            this.chargeEffect.transform.localScale = Vector3.one * (this.charge / 5f);
            this.durationStopWatch += Time.fixedDeltaTime;
            if (this.durationStopWatch > chargeDuration)
            {
                base.characterBody.SetAimTimer(this.chargeDuration);
                this.charge           += 1;
                this.durationStopWatch = 0f;
                if (stock > 0)
                {
                    base.activatorSkillSlot.DeductStock(1);
                }
                else if (base.isAuthority)
                {
                    this.outer.SetNextState(new YokoPiercingRifle()
                    {
                        charge = this.charge
                    });
                    return;
                }
            }
            if (base.isAuthority && !base.IsKeyDownAuthority())
            {
                this.outer.SetNextState(new YokoPiercingRifle()
                {
                    charge = this.charge
                });
                return;
            }
        }
 // Token: 0x06002DF3 RID: 11763 RVA: 0x000C3958 File Offset: 0x000C1B58
 public override void FixedUpdate()
 {
     base.FixedUpdate();
     this.charge = Mathf.Clamp01(base.fixedAge / this.chargeDuration);
     AkSoundEngine.SetRTPCValueByPlayingID("loaderShift_chargeAmount", this.charge * 100f, this.soundID);
     base.characterBody.SetSpreadBloom(this.charge, true);
     base.characterBody.SetAimTimer(3f);
     if (this.charge >= BaseChargeFist.minChargeForChargedAttack && !this.chargeVfxInstanceTransform && BaseChargeFist.chargeVfxPrefab)
     {
         this.defaultCrosshairPrefab = base.characterBody.crosshairPrefab;
         if (BaseChargeFist.crosshairOverridePrefab)
         {
             base.characterBody.crosshairPrefab = BaseChargeFist.crosshairOverridePrefab;
         }
         Transform transform = base.FindModelChild(BaseChargeFist.chargeVfxChildLocatorName);
         if (transform)
         {
             this.chargeVfxInstanceTransform = UnityEngine.Object.Instantiate <GameObject>(BaseChargeFist.chargeVfxPrefab, transform).transform;
             ScaleParticleSystemDuration component = this.chargeVfxInstanceTransform.GetComponent <ScaleParticleSystemDuration>();
             if (component)
             {
                 component.newDuration = (1f - BaseChargeFist.minChargeForChargedAttack) * this.chargeDuration;
             }
         }
         base.PlayCrossfade("Gesture, Additive", "ChargePunchIntro", "ChargePunchIntro.playbackRate", this.chargeDuration, 0.1f);
         base.PlayCrossfade("Gesture, Override", "ChargePunchIntro", "ChargePunchIntro.playbackRate", this.chargeDuration, 0.1f);
     }
     if (this.chargeVfxInstanceTransform)
     {
         base.characterMotor.walkSpeedPenaltyCoefficient = BaseChargeFist.walkSpeedCoefficient;
     }
     if (base.isAuthority)
     {
         this.AuthorityFixedUpdate();
     }
 }
Ejemplo n.º 10
0
        internal static void PlayKnifeHit(GameObject source, KnifeHitMaterial mat)
        {
            var id = AkSoundEngine.PostEvent(mat.GetSound(), source);

            _ = AkSoundEngine.SetRTPCValueByPlayingID(Sounds.Sniper_Volume_ALL.ID(), ConfigModule.sfxVolume, id);
        }
Ejemplo n.º 11
0
        internal static void PlayLoad(GameObject source, ReloadTier reloadTier)
        {
            var id = AkSoundEngine.PostEvent(reloadTier.GetSound(), source);

            _ = AkSoundEngine.SetRTPCValueByPlayingID(Sounds.Sniper_Volume_ALL.ID(), ConfigModule.sfxVolume, id);
        }
Ejemplo n.º 12
0
        internal static void PlayRicochet(GameObject source)
        {
            var id = AkSoundEngine.PostEvent(Sounds.Bolt_Ricochet.ID(), source);

            _ = AkSoundEngine.SetRTPCValueByPlayingID(Sounds.Sniper_Volume_ALL.ID(), ConfigModule.sfxVolume, id);
        }
Ejemplo n.º 13
0
        internal static void PlayOpenReload(GameObject source)
        {
            var id = AkSoundEngine.PostEvent(Sounds.Bolt_Open_Chamber.ID(), source);

            _ = AkSoundEngine.SetRTPCValueByPlayingID(Sounds.Sniper_Volume_ALL.ID(), ConfigModule.sfxVolume, id);
        }