com.github.czyzby.autumn.mvc.component.sfx.dto.ToggleSoundAction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gdx-autumn-mvc Show documentation
Show all versions of gdx-autumn-mvc Show documentation
MVC framework based on LibGDX using Autumn for components management and LML as view templates.
package com.github.czyzby.autumn.mvc.component.sfx.dto;
import com.github.czyzby.autumn.mvc.component.sfx.MusicService;
import com.github.czyzby.lml.parser.action.ActorConsumer;
/** Changes sounds state on invocation.
*
* @author MJ */
public class ToggleSoundAction implements ActorConsumer {
private final MusicService musicService;
public ToggleSoundAction(final MusicService musicService) {
this.musicService = musicService;
}
@Override
public Void consume(final Object actor) {
musicService.setSoundEnabled(!musicService.isSoundEnabled());
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy