From 8f3c08f2713450064fa8d11e947aee925589e18b Mon Sep 17 00:00:00 2001 From: Rohan Sircar Date: Wed, 24 Mar 2021 14:21:28 +0530 Subject: [PATCH] minor misc changes --- .../doge/mygame/game/entities/NpcActorSupervisor.scala | 4 ++-- .../game/entities/player/PlayerMovementReducer.scala | 2 +- .../doge/mygame/game/subsystems/input/InputMappings.scala | 2 +- .../mygame/game/subsystems/movement/MovementActor.scala | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) mode change 100644 => 100755 src/main/scala/wow/doge/mygame/game/entities/NpcActorSupervisor.scala mode change 100644 => 100755 src/main/scala/wow/doge/mygame/game/entities/player/PlayerMovementReducer.scala mode change 100644 => 100755 src/main/scala/wow/doge/mygame/game/subsystems/input/InputMappings.scala mode change 100644 => 100755 src/main/scala/wow/doge/mygame/game/subsystems/movement/MovementActor.scala diff --git a/src/main/scala/wow/doge/mygame/game/entities/NpcActorSupervisor.scala b/src/main/scala/wow/doge/mygame/game/entities/NpcActorSupervisor.scala old mode 100644 new mode 100755 index 827fee7..ee3fd59 --- a/src/main/scala/wow/doge/mygame/game/entities/NpcActorSupervisor.scala +++ b/src/main/scala/wow/doge/mygame/game/entities/NpcActorSupervisor.scala @@ -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 diff --git a/src/main/scala/wow/doge/mygame/game/entities/player/PlayerMovementReducer.scala b/src/main/scala/wow/doge/mygame/game/entities/player/PlayerMovementReducer.scala old mode 100644 new mode 100755 index 844679d..b9a3a0f --- a/src/main/scala/wow/doge/mygame/game/entities/player/PlayerMovementReducer.scala +++ b/src/main/scala/wow/doge/mygame/game/entities/player/PlayerMovementReducer.scala @@ -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, diff --git a/src/main/scala/wow/doge/mygame/game/subsystems/input/InputMappings.scala b/src/main/scala/wow/doge/mygame/game/subsystems/input/InputMappings.scala old mode 100644 new mode 100755 index b00c67c..2b53df7 --- a/src/main/scala/wow/doge/mygame/game/subsystems/input/InputMappings.scala +++ b/src/main/scala/wow/doge/mygame/game/subsystems/input/InputMappings.scala @@ -13,7 +13,7 @@ class InputMappings(inputManager: InputManager) { def setup = for { _ <- setupMovementKeys - _ <- setupAnalogMovementKeys + // _ <- setupAnalogMovementKeys _ <- setupCameraKeys _ <- cursorToggle } yield () diff --git a/src/main/scala/wow/doge/mygame/game/subsystems/movement/MovementActor.scala b/src/main/scala/wow/doge/mygame/game/subsystems/movement/MovementActor.scala old mode 100644 new mode 100755 index 78e862b..da058f7 --- a/src/main/scala/wow/doge/mygame/game/subsystems/movement/MovementActor.scala +++ b/src/main/scala/wow/doge/mygame/game/subsystems/movement/MovementActor.scala @@ -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 =>