StopPlayingID() public static method

public static StopPlayingID ( uint in_playingID ) : void
in_playingID uint
return void
Ejemplo n.º 1
0
 private void StopSound()
 {
     if (soundId >= 0)
     {
         AkSoundEngine.StopPlayingID((uint)soundId);
     }
 }
 public void OnDisable()
 {
     if (eyeCatchEventId != 0)
     {
         AkSoundEngine.StopPlayingID(eyeCatchEventId);
     }
 }
Ejemplo n.º 3
0
 public void Awake()
 {
     R2API.LanguageAPI.AddPath("OOFShitpostPack/language/CharacterBodies");
     R2API.LanguageAPI.AddPath("OOFShitpostPack/language/Dialogue");
     R2API.LanguageAPI.AddPath("OOFShitpostPack/language/Equipment");
     R2API.LanguageAPI.AddPath("OOFShitpostPack/language/Items");
     R2API.LanguageAPI.AddPath("OOFShitpostPack/language/Messages");
     R2API.LanguageAPI.AddPath("OOFShitpostPack/language/Interactors");
     //sound
     takemoonbank = LoadSoundBank(Properties.Resources.MoonTake);
     // loop id 2693398676
     On.EntityStates.BrotherMonster.ThroneSpawnState.OnEnter += (orig, self) =>
     {
         AkSoundEngine.PostEvent(2693398676, self.outer.gameObject);
         orig(self);
         Target    = self.outer.gameObject;
         coroutine = WaitAndPlay(5.51f);
         StartCoroutine(coroutine);
     };
     On.EntityStates.BrotherMonster.TrueDeathState.OnEnter += (orig, self) =>
     {
         AkSoundEngine.StopPlayingID(2693398676);
         Dead = true;
         orig(self);
     };
 }
Ejemplo n.º 4
0
    public void ResetGame()
    {
        TerrainFront.position           = TerrainFrontStartPosition;
        TerrainBack.position            = TerrainBackStartPosition;
        DoorsCurrent.transform.position = DoorsCurrentStartPosition;
        DoorsNext.transform.position    = DoorsNextStartPosition;
        PlayerTransform.position        = PlayerStartPosition;
        PlayerTransform.gameObject.GetComponent <PlayerController>().SetMovementEnabled(false);
        DoorController[] doors = DoorsCurrent.GetComponentsInChildren <DoorController>();
        foreach (DoorController d in doors)
        {
            d.CloseInstant();
        }
        doors = DoorsNext.GetComponentsInChildren <DoorController>();
        foreach (DoorController d in doors)
        {
            d.CloseInstant();
        }
        GateController gate = DoorsCurrent.GetComponent <GateController>();

        if (gate != null)
        {
            gate.DoorChangeFrequency = Random.Range(0.5f, 3.0f);
            gate.StartFlipping();
        }
        ButtonObject.SetActive(true);
        Instructions.gameObject.SetActive(true);
        DestroySpikes();

        AkSoundEngine.StopPlayingID(MusicPlayingID);
        AkSoundEngine.SetRTPCValue("Dare", 0.0f);
    }
Ejemplo n.º 5
0
 private void OnDestroy()
 {
     if (this.playID != 0)
     {
         AkSoundEngine.StopPlayingID(this.playID);
     }
 }
Ejemplo n.º 6
0
 public void StopEvents()
 {
     foreach (var id in eventIDs)
     {
         AkSoundEngine.StopPlayingID(id);
     }
 }
Ejemplo n.º 7
0
        public void Awake()
        {
            using (var bankStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("CurbYourDeath.CYE.bnk"))
            {
                var bytes = new byte[bankStream.Length];
                bankStream.Read(bytes, 0, bytes.Length);
                SoundAPI.SoundBanks.Add(bytes);
            }

            On.RoR2.GlobalEventManager.OnPlayerCharacterDeath += (orig, self, damageReport, victimNetworkUser) =>
            {
                int extraLives = damageReport.victimBody.inventory.GetItemCount(RoR2Content.Items.ExtraLife);
                if (extraLives == 0)
                {
                    eventId     = AkSoundEngine.PostEvent(2106046636, base.gameObject);
                    curbPlaying = true;
                }
                orig(self, damageReport, victimNetworkUser);
            };

            On.RoR2.SceneObjectToggleGroup.OnServerSceneChanged += (orig, self) =>
            {
                AkSoundEngine.StopPlayingID(eventId, 5);
                curbPlaying = false;
                orig(self);
            };
        }
Ejemplo n.º 8
0
 // Update is called once per frame
 void Update()
 {
     AkSoundEngine.SetRTPCValue("WindVolume", ((transform.position.y * 100) - 800) / 42);
     if (!alive)
     {
         speed = Mathf.Clamp(speed - 0.2f * Time.deltaTime, 0f, 4f);
         transform.position += Vector3.up * Time.deltaTime * speed;
         Color c = instructions.color;
         c.a = Mathf.Clamp(c.a + Time.deltaTime * 0.1f, 0f, 1f);
         instructions.rectTransform.localPosition = new Vector3(18, (c.a * 100f) - 100f);
         instructions.color = c;
         if (Input.GetKeyDown(KeyCode.Space))
         {
             UnityEngine.SceneManagement.SceneManager.LoadScene("SampleScene");
         }
         return;
     }
     direction.y = Input.GetAxis("Vertical") - (Mathf.Clamp(5f - (speed - 4f) * 0.5f, 0.2f, 7f) * 0.3f);
     if (transform.position.y < 7f)
     {
         // Game over!
         AkSoundEngine.StopPlayingID(themeID);
         AkSoundEngine.PostEvent("Lose", gameObject);
         Destroy(squirrel.gameObject);
         alive = false;
         speed = 4f;
         ScatterButterflies();
     }
 }
 public override void OnExit()
 {
     AllowOutOfBound(false);
     DisableCameraOverride();
     this.SetPosition(base.gameObject, this.previousPosition);
     this.SetAntiGravity(base.characterBody, false);
     if (gigaDrillBreakTarget)
     {
         this.SetPosition(gigaDrillBreakTarget.gameObject, this.previousTargetPosition);
         this.SetAntiGravity(gigaDrillBreakTarget, false);
     }
     //UnConstrictBoss(gigaDrillBreakTarget);
     base.PlayAnimation("FullBody, Override", "BufferEmpty");
     if (!this.fired)
     {
         explosionIndex = 0;
         Explode((this.previousTargetPosition != null) ? this.previousTargetPosition : this.previousPosition);
         explosionIndex = 1;
         Explode((this.previousTargetPosition != null) ? this.previousTargetPosition : this.previousPosition);
     }
     if (NetworkServer.active)
     {
         base.characterBody.RemoveBuff(RoR2.RoR2Content.Buffs.HiddenInvincibility);
     }
     if (this.currentSound != 0)
     {
         AkSoundEngine.StopPlayingID(this.currentSound);
     }
     this.TransformToLagann(this.previousPosition);
     base.OnExit();
 }
Ejemplo n.º 10
0
        public override void OnExit()
        {
            if (this.crosshairOverridePrefab)
            {
                base.characterBody.crosshairPrefab = this.defaultCrosshairPrefab;
            }
            else
            {
                base.characterBody.hideCrosshair = false;
            }

            if (this.areaIndicatorInstance)
            {
                EntityState.Destroy(this.areaIndicatorInstance.gameObject);
            }

            AkSoundEngine.StopPlayingID(this.loopSoundInstanceId);

            if (!this.outer.destroying)
            {
                base.PlayAnimation("Gesture, Override", "BufferEmpty");
            }

            if (base.cameraTargetParams)
            {
                base.cameraTargetParams.aimMode = CameraTargetParams.AimType.Standard;
            }

            EntityState.Destroy(this.chargeEffectInstance);
            base.OnExit();
        }
Ejemplo n.º 11
0
    private void UpdateDetection()
    {
        if (seahorses.Count == 0)
        {
            // You won the game!
            gameWon = 2.5f;
            return;
        }
        float closest   = CheckNearest();
        float detection = 0f;

        if (closest < failurePoint)
        {
            AkSoundEngine.StopPlayingID(_themeSong);
            UnityEngine.SceneManagement.SceneManager.LoadScene("End");
        }
        if (closest < dangerThreshold)
        {
            closest  -= failurePoint;
            detection = 1f - (closest / (dangerThreshold - failurePoint));
            if (detection > 0.2f)
            {
                AkSoundEngine.SetSwitch("Danger", "Nearby", gameObject);
            }
            else
            {
                AkSoundEngine.SetSwitch("Danger", "Clean", gameObject);
            }
            detectionLeftMeter.color  = Color.Lerp(Color.yellow, Color.red, detection);
            detectionRightMeter.color = Color.Lerp(Color.yellow, Color.red, detection);
        }

        detectionLeftMeter.fillAmount  = detection;
        detectionRightMeter.fillAmount = detection;
    }
Ejemplo n.º 12
0
        public override void OnExit()
        {
            base.OnExit();

            base.characterBody.hideCrosshair     = false;
            base.cameraTargetParams.cameraParams = this.originalCameraParams;

            if (base.GetAimAnimator())
            {
                base.GetAimAnimator().enabled = true;
            }
            if (this.animator)
            {
                this.animator.SetLayerWeight(animator.GetLayerIndex("AimPitch"), 1);
                this.animator.SetLayerWeight(animator.GetLayerIndex("AimYaw"), 1);
            }

            if (this.normalizeModel)
            {
                if (base.modelLocator)
                {
                    base.modelLocator.normalizeToFloor = false;
                }
            }

            base.PlayAnimation("FullBody, Override", "BufferEmpty");
            if (this.activePlayID != 0)
            {
                AkSoundEngine.StopPlayingID(this.activePlayID);
            }
        }
Ejemplo n.º 13
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetMouseButtonDown(0))
     {
         AkSoundEngine.StopPlayingID(_event);
         UnityEngine.SceneManagement.SceneManager.LoadScene(nextScene);
     }
 }
Ejemplo n.º 14
0
 public void OnDestroy()
 {
     if (body)
     {
         body.onInventoryChanged -= Body_onInventoryChanged;
     }
     AkSoundEngine.StopPlayingID(countdown10ID);
 }
    private void Term()
    {
        AkSoundEngine.StopPlayingID(m_PlayingID);

        IntPtr in_pInMemoryBankPtr = IntPtr.Zero;

        AkSoundEngine.UnloadBank(m_BankName, in_pInMemoryBankPtr);
    }
Ejemplo n.º 16
0
        private void FireShockwave()
        {
            if (!this.hasFired)
            {
                this.hasFired = true;

                if (NetworkServer.active)
                {
                    base.characterBody.RemoveBuff(Modules.Buffs.armorBuff);
                }

                AkSoundEngine.StopPlayingID(this.soundID);

                Vector3 position = base.transform.position;
                Util.PlaySound("UNUNUN", base.gameObject);

                if (FireMegaNova.novaEffectPrefab)
                {
                    EffectManager.SimpleMuzzleFlash(FireMegaNova.novaEffectPrefab, base.gameObject, "Chest", false);
                }

                Transform modelTransform = base.GetModelTransform();
                if (modelTransform)
                {
                    TemporaryOverlay temporaryOverlay = modelTransform.gameObject.AddComponent <TemporaryOverlay>();
                    temporaryOverlay.duration              = 3f;
                    temporaryOverlay.animateShaderAlpha    = true;
                    temporaryOverlay.alphaCurve            = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f);
                    temporaryOverlay.destroyComponentOnEnd = true;
                    temporaryOverlay.originalMaterial      = Resources.Load <Material>("Materials/matVagrantEnergized");
                    temporaryOverlay.AddToCharacerModel(modelTransform.GetComponent <CharacterModel>());
                }

                if (base.isAuthority)
                {
                    new BlastAttack
                    {
                        attacker          = base.gameObject,
                        baseDamage        = this.storedDamage,
                        baseForce         = FireMegaNova.novaForce,
                        bonusForce        = Vector3.zero,
                        attackerFiltering = AttackerFiltering.NeverHit,
                        crit             = base.RollCrit(),
                        damageColorIndex = DamageColorIndex.Default,
                        damageType       = DamageType.Generic,
                        falloffModel     = BlastAttack.FalloffModel.None,
                        inflictor        = base.gameObject,
                        position         = position,
                        procChainMask    = default(ProcChainMask),
                        procCoefficient  = 1f,
                        radius           = this.shockwaveRadius,
                        losType          = BlastAttack.LoSType.NearestHit,
                        teamIndex        = base.teamComponent.teamIndex,
                        impactEffect     = EffectCatalog.FindEffectIndexFromPrefab(FireMegaNova.novaImpactEffectPrefab)
                    }.Fire();
                }
            }
        }
Ejemplo n.º 17
0
 // Token: 0x06002E95 RID: 11925 RVA: 0x000C6211 File Offset: 0x000C4411
 public override void OnExit()
 {
     base.OnExit();
     AkSoundEngine.StopPlayingID(this.soundID);
     if (this.chargeEffectInstance)
     {
         EntityState.Destroy(this.chargeEffectInstance);
     }
 }
Ejemplo n.º 18
0
 private void OnDestroy()
 {
     //If somehow we died early, stop sounds as well
     if (!_expiring)
     {
         AkSoundEngine.StopPlayingID(_soundEvent1, 1000);
         AkSoundEngine.StopPlayingID(_soundEvent2, 1000);
     }
 }
 // Token: 0x060003D5 RID: 981 RVA: 0x0000FD30 File Offset: 0x0000DF30
 public override void OnExit()
 {
     base.OnExit();
     if (base.GetModelAnimator())
     {
         base.GetModelAnimator().SetBool("isFiringNailgun", false);
     }
     AkSoundEngine.StopPlayingID(this.soundID);
 }
Ejemplo n.º 20
0
    private void DestroyStar(VisualEffect healFx, Projectile proj)
    {
        healFx.SetFloat("Radius", 0.1f);
        healFx.SetFloat("AttractionForce", 5000);
        healFx.SetFloat("StickForce", 50000);
        healFx.SetVector3("PlayerPosition", transform.position - proj.transform.position);

        StartCoroutine(UpdatePosFx(healFx, proj.transform.position, proj));
        AkSoundEngine.StopPlayingID(playerHeal);
    }
Ejemplo n.º 21
0
 /// <summary>
 /// Tell the employee to move somewhere
 /// </summary>
 /// <param name="destination"></param>
 public override void MoveTo(Vector3 destination)
 {
     // only walk when allowed to by the state machine
     if (CanWalk)
     {
         AkSoundEngine.StopPlayingID(walkEvent);
         walkEvent = AkSoundEngine.PostEvent("Walk", gameObject);
         SetPathDestination(destination);
     }
 }
Ejemplo n.º 22
0
 public override void OnExit()
 {
     base.PlayAnimation("Gesture, Additive", "Empty");
     AkSoundEngine.StopPlayingID(this.chargeupSoundID);
     if (this.chargeEffectInstance)
     {
         EntityState.Destroy(this.chargeEffectInstance);
     }
     base.OnExit();
 }
 // Token: 0x06001E99 RID: 7833 RVA: 0x000841F4 File Offset: 0x000823F4
 private void OnDestroy()
 {
     if (this.ropeEndTransform)
     {
         Util.PlaySound(this.exitSoundString, this.ropeEndTransform.gameObject);
         UnityEngine.Object.Destroy(this.ropeEndTransform.gameObject);
         return;
     }
     AkSoundEngine.StopPlayingID(this.soundID);
 }
Ejemplo n.º 24
0
            internal void OnDisable()
            {
                bool flag  = this.playID > 0U;
                bool flag2 = flag;

                if (flag2)
                {
                    AkSoundEngine.StopPlayingID(this.playID);
                }
            }
Ejemplo n.º 25
0
 public override void OnExit()
 {
     base.PlayAnimation("Plant", "Empty");
     AkSoundEngine.StopPlayingID(this.soundID);
     Util.PlaySound(Plant.healSoundStop, base.gameObject);
     if (this.mushroomWard)
     {
         EntityState.Destroy(this.mushroomWard);
     }
     base.OnExit();
 }
Ejemplo n.º 26
0
 /// <summary>
 /// Tell the customer to move to a place
 /// </summary>
 /// <param name="destination"></param>
 public override void MoveTo(Vector3 destination)
 {
     // only moves when the customer is allowed to
     if (CanWalk)
     {
         AkSoundEngine.StopPlayingID(walkEvent);
         walkEvent = AkSoundEngine.PostEvent("Walk", gameObject);
         SetPathDestination(destination);
         //walk.Stop(gameObject);
     }
 }
Ejemplo n.º 27
0
 // Token: 0x060008AB RID: 2219 RVA: 0x0002B888 File Offset: 0x00029A88
 public override void OnExit()
 {
     this.DestroyTethers();
     if (this.mulchEffect)
     {
         EntityState.Destroy(this.mulchEffect);
     }
     AkSoundEngine.StopPlayingID(this.soundID);
     Util.PlaySound(Recover.stopMulchSoundString, base.gameObject);
     base.characterBody.RemoveBuff(BuffIndex.ArmorBoost);
     base.OnExit();
 }
Ejemplo n.º 28
0
        //private void DotController_InflictDot_GameObject_GameObject_DotIndex_float_float(On.RoR2.DotController.orig_InflictDot_GameObject_GameObject_DotIndex_float_float_nu orig, UnityEngine.GameObject victimObject, UnityEngine.GameObject attackerObject, DotController.DotIndex dotIndex, float duration, float damageMultiplier)
        //{

        //}

        private void DamageTrail_DoDamage(On.RoR2.DamageTrail.orig_DoDamage orig, DamageTrail self)
        {
            if (self)
            {
                if (self.segmentPrefab.name == "FireTrailSegment")
                {
                    self.damagePerSecond = 0;
                    AkSoundEngine.StopPlayingID(3193947170);
                }
            }
            orig(self);
        }
Ejemplo n.º 29
0
 // Token: 0x06000737 RID: 1847 RVA: 0x00023220 File Offset: 0x00021420
 public override void OnExit()
 {
     AkSoundEngine.StopPlayingID(this.chargePlayID);
     base.OnExit();
     if (this.chargeEffect)
     {
         EntityState.Destroy(this.chargeEffect);
     }
     if (this.laserEffect)
     {
         EntityState.Destroy(this.laserEffect);
     }
 }
Ejemplo n.º 30
0
 private void SetParticles()
 {
     ParticleSystem.EmissionModule fEmission = fireSystem.emission;
     fEmission.rateOverTime = Mathf.Clamp(heat * 15, 0, 30);
     ParticleSystem.EmissionModule sEmission = smokeSystem.emission;
     sEmission.rateOverTime = Mathf.Clamp(heat * 30, 0, 60);
     light.intensity        = Mathf.Clamp(heat * 0.5f, 0f, 3f);
     if (light.intensity < 0.01)
     {
         AkSoundEngine.StopPlayingID(fireID);
     }
     AkSoundEngine.SetRTPCValue("FirePower", light.intensity * 100.0f, gameObject);
 }