Add GameService

Signed-off-by: Graham <gpe@openrs2.org>
bzip2
Graham 4 years ago
parent 60ecda74ec
commit 9b0260a3df
  1. 1
      game/src/main/kotlin/org/openrs2/game/GameModule.kt
  2. 16
      game/src/main/kotlin/org/openrs2/game/GameService.kt

@ -23,6 +23,7 @@ public object GameModule : AbstractModule() {
install(NetworkModule) install(NetworkModule)
val binder = Multibinder.newSetBinder(binder(), Service::class.java) val binder = Multibinder.newSetBinder(binder(), Service::class.java)
binder.addBinding().to(GameService::class.java)
binder.addBinding().to(Js5Service::class.java) binder.addBinding().to(Js5Service::class.java)
binder.addBinding().to(NetworkService::class.java) binder.addBinding().to(NetworkService::class.java)

@ -0,0 +1,16 @@
package org.openrs2.game
import com.google.common.util.concurrent.AbstractScheduledService
import java.util.concurrent.TimeUnit
import javax.inject.Singleton
@Singleton
public class GameService : AbstractScheduledService() {
override fun runOneIteration() {
// TODO(gpe): implement
}
override fun scheduler(): Scheduler {
return Scheduler.newFixedRateSchedule(0, 600, TimeUnit.MILLISECONDS)
}
}
Loading…
Cancel
Save