Exemplo n.º 1
0
void AMurphysLawCharacter::MoveRight(float Value)
{
	if (Value != 0.0f && CanPlayerMove())
	{
		// add movement in that direction
		AddMovementInput(GetActorRightVector(), Value);
	}
}
Exemplo n.º 2
0
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);
	}
}
Exemplo n.º 3
0
int CPlayer::CanPlayerMoveDown(CBlock** pushingBlock)  { return CanPlayerMove( 0,  1, pushingBlock); }
Exemplo n.º 4
0
int CPlayer::CanPlayerMoveUp(CBlock** pushingBlock)    { return CanPlayerMove( 0, -1, pushingBlock); }
Exemplo n.º 5
0
int CPlayer::CanPlayerMoveRight(CBlock** pushingBlock) { return CanPlayerMove( 1,  0, pushingBlock); }
Exemplo n.º 6
0
int CPlayer::CanPlayerMoveLeft(CBlock** pushingBlock)  { return CanPlayerMove(-1,  0, pushingBlock); }