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

View File

@ -4,6 +4,7 @@ import scala.concurrent.duration._
import akka.util.Timeout import akka.util.Timeout
import cats.syntax.eq._ import cats.syntax.eq._
import io.odin.Logger
import monix.eval.Fiber import monix.eval.Fiber
import monix.eval.Task import monix.eval.Task
import monix.reactive.Observable 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.implicits._
import wow.doge.mygame.types.AkkaScheduler import wow.doge.mygame.types.AkkaScheduler
import wow.doge.mygame.utils.MovementDirection import wow.doge.mygame.utils.MovementDirection
import io.odin.Logger
class PlayerMovementReducer( class PlayerMovementReducer(
val playerActor: PlayerActor.Ref, val playerActor: PlayerActor.Ref,

View File

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

View File

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