void ASCharacter::OnStartFire() { if (IsSprinting()) { SetSprinting(false); } StartWeaponFire(); }
void ASCharacter::OnStartSprinting() { if (CarriedObjectComp->GetIsCarryingActor()) { CarriedObjectComp->Drop(); } SetSprinting(true); }
void AShooterCharacter::Tick(float DeltaTime) { Super::Tick(DeltaTime); if (bWantsToRun && !IsSprinting()) { SetSprinting(true); } }
void ASCharacter::OnStartFire() { if (IsSprinting()) { SetSprinting(false); } if (CarriedObjectComp->GetIsCarryingActor()) { StopWeaponFire(); CarriedObjectComp->Throw(); return; } StartWeaponFire(); }
void ASCharacter::OnCrouchToggle() { if (IsSprinting()) { SetSprinting(false); } // If we are crouching then CanCrouch will return false. If we cannot crouch then calling Crouch() wont do anything if (CanCrouch()) { Crouch(); } else { UnCrouch(); } }
void ASCharacter::Tick(float DeltaTime) { Super::Tick(DeltaTime); if (bWantsToRun && !IsSprinting()) { SetSprinting(true); } if (Controller && Controller->IsLocalController()) { ASUsableActor* Usable = GetUsableInView(); // End Focus if (FocusedUsableActor != Usable) { if (FocusedUsableActor) { FocusedUsableActor->OnEndFocus(); } bHasNewFocus = true; } // Assign new Focus FocusedUsableActor = Usable; // Start Focus. if (Usable) { if (bHasNewFocus) { Usable->OnBeginFocus(); bHasNewFocus = false; } } } }
void ASCharacter::OnStopSprinting() { SetSprinting(false); }
void ASCharacter::ServerSetSprinting_Implementation(bool NewSprinting) { SetSprinting(NewSprinting); }
void ASCharacter::OnStartSprinting() { SetSprinting(true); }
void AShooterCharacter::OnStartJump() { bPressedJump = true; SetIsJumping(true); SetSprinting(false); }