public override void Quack(float volume, float pitch) { SFX.KillAllSounds(); //if (EdoMod.isDeveloper && equippedDuck != null) //{ // equippedDuck.visible = !equippedDuck.visible; //} cquack = SFX.Play(Mod.GetPath <EdoMod>("SFX\\no-1"), volume, pitch); tmr = 1.1f; }
public override void Update() { base.Update(); if (equippedDuck == null || cquack == null) { return; } if (!equippedDuck.IsQuacking()) { return; } float pitch = equippedDuck.quackPitch; if (pitch < 0f) { pitch = 0f; } if (pitch > 1f) { pitch = 1f; } cquack.Pitch = pitch; if (tmr > 0) { tmr -= 0.05f; } else { SFX.KillAllSounds(); } }
public override void Update() { _timer = 99f; base.Update(); PinUpdate(); if (_realTimer <= 0f && _detonationTrigger == 0) { //Shockwave(); Explosion(); _detonationTrigger++; _destroyed = true; //_detonationTrigger = -1; } else if (_detonationTrigger > 0) { _detonationTrigger++; if (_detonationTrigger == 9) { Layer.Game.colorMul = Layer.Glow.colorMul = Layer.Parallax.colorMul = Layer.Background.colorMul = Layer.Blocks.colorMul = Layer.Lighting.colorMul = Layer.Lighting2.colorMul = new Vec3(255f, 249f, 201f) / 255f; /*Layer.Game.darken = * Layer.Glow.darken = * Layer.Parallax.darken = * Layer.Background.darken = * Layer.Blocks.darken = * Layer.Lighting.darken = * Layer.Lighting2.darken = 1f / 8f;*/ } if (_detonationTrigger == 10) { SFX.KillAllSounds(); Thread.Sleep(4000); Layer.Game.colorMul = Layer.Glow.colorMul = Layer.Parallax.colorMul = Layer.Background.colorMul = Layer.Blocks.colorMul = Layer.Lighting.colorMul = Layer.Lighting2.colorMul = new Vec3(0f);; if (Level.current is GameLevel) { (Level.current as GameLevel).SkipMatch(); } Music.Resume(); //DelayCallback(); Level.Remove(this); } } sprite.frame = _pin ? 0 : 1; if (_triggered) { Graphics.Draw(_snap, 0, 0); } }