minor misc changes
This commit is contained in:
parent
dd01b070ff
commit
8f3c08f271
4
src/main/scala/wow/doge/mygame/game/entities/NpcActorSupervisor.scala
Normal file → Executable file
4
src/main/scala/wow/doge/mygame/game/entities/NpcActorSupervisor.scala
Normal file → Executable 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
|
||||
|
2
src/main/scala/wow/doge/mygame/game/entities/player/PlayerMovementReducer.scala
Normal file → Executable file
2
src/main/scala/wow/doge/mygame/game/entities/player/PlayerMovementReducer.scala
Normal file → Executable 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,
|
||||
|
2
src/main/scala/wow/doge/mygame/game/subsystems/input/InputMappings.scala
Normal file → Executable file
2
src/main/scala/wow/doge/mygame/game/subsystems/input/InputMappings.scala
Normal file → Executable file
@ -13,7 +13,7 @@ class InputMappings(inputManager: InputManager) {
|
||||
def setup =
|
||||
for {
|
||||
_ <- setupMovementKeys
|
||||
_ <- setupAnalogMovementKeys
|
||||
// _ <- setupAnalogMovementKeys
|
||||
_ <- setupCameraKeys
|
||||
_ <- cursorToggle
|
||||
} yield ()
|
||||
|
8
src/main/scala/wow/doge/mygame/game/subsystems/movement/MovementActor.scala
Normal file → Executable file
8
src/main/scala/wow/doge/mygame/game/subsystems/movement/MovementActor.scala
Normal file → Executable 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 =>
|
||||
|
Loading…
Reference in New Issue
Block a user