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"
|
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
|
||||||
|
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 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,
|
||||||
|
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 =
|
def setup =
|
||||||
for {
|
for {
|
||||||
_ <- setupMovementKeys
|
_ <- setupMovementKeys
|
||||||
_ <- setupAnalogMovementKeys
|
// _ <- setupAnalogMovementKeys
|
||||||
_ <- setupCameraKeys
|
_ <- setupCameraKeys
|
||||||
_ <- cursorToggle
|
_ <- cursorToggle
|
||||||
} yield ()
|
} 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) =>
|
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 =>
|
||||||
|
Loading…
Reference in New Issue
Block a user