public void StartWorking(NodeAddedEvent evt, ReadyIsisSoundEffectWorkingNode weapon) { IsisCurrentSoundEffectComponent component = new IsisCurrentSoundEffectComponent { SoundController = weapon.isisHealingSoundEffect.SoundController }; weapon.Entity.AddComponent(component); }
private void PlayIsisSoundEffect(IsisCurrentSoundEffectComponent currentSoundEffect) { if (!currentSoundEffect.WasStarted) { currentSoundEffect.WasStarted = true; currentSoundEffect.SoundController.FadeIn(); } }
private void UpdateIsisSoundEffect(IsisCurrentSoundEffectComponent isisCurrentSoundEffect, SoundController soundController) { if (!isisCurrentSoundEffect.WasStopped) { if (!isisCurrentSoundEffect.WasStarted) { isisCurrentSoundEffect.SoundController = soundController; isisCurrentSoundEffect.WasStarted = true; soundController.FadeIn(); } else if (isisCurrentSoundEffect.SoundController != soundController) { isisCurrentSoundEffect.SoundController.FadeOut(); isisCurrentSoundEffect.SoundController = soundController; soundController.FadeIn(); } } }
private void StopIsisSoundEffect(IsisCurrentSoundEffectComponent currentSoundEffect) { currentSoundEffect.WasStopped = true; currentSoundEffect.SoundController.FadeOut(); }
public void EnableIsisTargetSound(NodeAddedEvent e, TargetEffectNode weapon, [Context, JoinByTank] IsisCurrentSoundEffectNode isisSound, [Context, JoinByBattle] DMNode dm) { IsisCurrentSoundEffectComponent isisCurrentSoundEffect = isisSound.isisCurrentSoundEffect; this.UpdateIsisSoundEffect(isisCurrentSoundEffect, weapon.isisDamagingSoundEffect.SoundController); }
public void DisableIsisTargetSound(NodeRemoveEvent e, TargetEffectNode weapon, [JoinByTank] IsisCurrentSoundEffectNode isisSound) { IsisCurrentSoundEffectComponent isisCurrentSoundEffect = isisSound.isisCurrentSoundEffect; this.UpdateIsisSoundEffect(isisCurrentSoundEffect, weapon.isisHealingSoundEffect.SoundController); }