minor misc changes

This commit is contained in:
Rohan Sircar 2021-03-24 14:21:28 +05:30
parent dd01b070ff
commit 8f3c08f271
4 changed files with 8 additions and 8 deletions

View File

@ -72,7 +72,7 @@ class NpcActorSupervisor(
s"npc-${props.npcName}-NpcActorTimer"
)
def idle(state: State): Behavior[NpcActorSupervisor.Command] =
def idle(state: State): Behavior[Command] =
Behaviors.setup { _ =>
ctx.log.debugP(show"npcActor-${props.npcName}: Entered Idle State")
Behaviors.receiveMessage[Command] {
@ -99,7 +99,7 @@ class NpcActorSupervisor(
state: State,
targetPos: ImVector3f,
signal: CancelableFuture[NpcMovementActor.DoneMoving.type]
): Behavior[NpcActorSupervisor.Command] =
): Behavior[Command] =
Behaviors.setup { _ =>
ctx.log.debugP(show"npcActor-${props.npcName}: Entered Moving State")
movementTimer ! GenericTimerActor.Start

View File

@ -4,6 +4,7 @@ import scala.concurrent.duration._
import akka.util.Timeout
import cats.syntax.eq._
import io.odin.Logger
import monix.eval.Fiber
import monix.eval.Task
import monix.reactive.Observable
@ -19,7 +20,6 @@ import wow.doge.mygame.game.subsystems.input.PlayerMovementInput.WalkRight
import wow.doge.mygame.implicits._
import wow.doge.mygame.types.AkkaScheduler
import wow.doge.mygame.utils.MovementDirection
import io.odin.Logger
class PlayerMovementReducer(
val playerActor: PlayerActor.Ref,

View File

@ -13,7 +13,7 @@ class InputMappings(inputManager: InputManager) {
def setup =
for {
_ <- setupMovementKeys
_ <- setupAnalogMovementKeys
// _ <- setupAnalogMovementKeys
_ <- setupCameraKeys
_ <- cursorToggle
} yield ()

View File

@ -85,25 +85,25 @@ class ImMovementActor[T](
case MoveLeft(pressed) =>
stopIfNotPressed(pressed)
receive(
state = state.modify(_.cardinalDir.left).setTo(pressed),
state.modify(_.cardinalDir.left).setTo(pressed),
walkDirBuf
)
case MoveUp(pressed) =>
stopIfNotPressed(pressed)
receive(
state = state.modify(_.cardinalDir.up).setTo(pressed),
state.modify(_.cardinalDir.up).setTo(pressed),
walkDirBuf
)
case MoveRight(pressed) =>
stopIfNotPressed(pressed)
receive(
state = state.modify(_.cardinalDir.right).setTo(pressed),
state.modify(_.cardinalDir.right).setTo(pressed),
walkDirBuf
)
case MoveDown(pressed) =>
stopIfNotPressed(pressed)
receive(
state = state.modify(_.cardinalDir.down).setTo(pressed),
state.modify(_.cardinalDir.down).setTo(pressed),
walkDirBuf
)
case Jump =>