forked from nova/jmonkey-test
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
634 B
25 lines
634 B
package wow.doge.mygame.game
|
|
|
|
import cats.effect.Resource
|
|
import com.jme3.app.state.AppState
|
|
import com.jme3.system.AppSettings
|
|
import monix.bio.Task
|
|
// import wow.doge.mygame.executors.JMERunner
|
|
|
|
trait GameModule {
|
|
|
|
def gameAppResource(appStates: AppState*): Resource[Task, GameApp] =
|
|
Resource.liftF {
|
|
for {
|
|
app <- Task(new GameApp(appStates: _*))
|
|
_ <- Task {
|
|
val settings = new AppSettings(true)
|
|
// settings.setVSync(true)
|
|
settings.setFrameRate(144)
|
|
app.setSettings(settings)
|
|
// JMERunner.runner = app
|
|
app
|
|
}
|
|
} yield (app)
|
|
}
|
|
}
|