void AMurphysLawCharacter::MoveRight(float Value) { if (Value != 0.0f && CanPlayerMove()) { // add movement in that direction AddMovementInput(GetActorRightVector(), Value); } }
void AMurphysLawCharacter::MoveForward(float Value) { if (Value != 0.0f && CanPlayerMove()) { // If the character is going backward, he can't be running if (Value < 0.f) { SetIsRunning(false); } // add movement in that direction AddMovementInput(GetActorForwardVector(), Value); } }
int CPlayer::CanPlayerMoveDown(CBlock** pushingBlock) { return CanPlayerMove( 0, 1, pushingBlock); }
int CPlayer::CanPlayerMoveUp(CBlock** pushingBlock) { return CanPlayerMove( 0, -1, pushingBlock); }
int CPlayer::CanPlayerMoveRight(CBlock** pushingBlock) { return CanPlayerMove( 1, 0, pushingBlock); }
int CPlayer::CanPlayerMoveLeft(CBlock** pushingBlock) { return CanPlayerMove(-1, 0, pushingBlock); }