本文整理汇总了C++中GetWorldTimerManager函数的典型用法代码示例。如果您正苦于以下问题:C++ GetWorldTimerManager函数的具体用法?C++ GetWorldTimerManager怎么用?C++ GetWorldTimerManager使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetWorldTimerManager函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetWorldTimerManager
// Start the block restore event (Called by weapon)
void ALevelBlock::StartTimedRestore(AWeapon* newParentWeapon, float Time)
{
if (newParentWeapon)
{
ParentWeapon = newParentWeapon;
if (Time>0)
{
FTimerHandle MyHandle;
GetWorldTimerManager().SetTimer(MyHandle, this, &ALevelBlock::ReturnBlock, Time, false);
}
}
}
示例2: GetMesh
void ABatteryPickup::WasCollected_Implementation()
{
Super::WasCollected_Implementation();
ParticleSystem = UGameplayStatics::SpawnEmitterAttached(ParticleSystemTemplate, GetMesh(), NAME_None);
UpdateBeamTargetPoint();
FTimerHandle UnusedHandle;
GetWorldTimerManager().SetTimer(
UnusedHandle, this, &ABatteryPickup::DestroyAfterDelay, 1, false);
}
示例3: StopSimulatingWeaponFire
void ASWeapon::OnBurstFinished()
{
BurstCounter = 0;
if (GetNetMode() != NM_DedicatedServer)
{
StopSimulatingWeaponFire();
}
GetWorldTimerManager().ClearTimer(TimerHandle_HandleFiring);
bRefiring = false;
}
示例4: UpdateTimerDisplay
void ACountdown::AdvanceTimer()
{
--CountdownTime;
UpdateTimerDisplay();
if (CountdownTime < 1)
{
// We're done counting down, so stop running the timer.
GetWorldTimerManager().ClearTimer(CountdownTimerHandle);
// Perform any special actions we want to do when the timer ends.
CountdownHasFinished();
}
}
示例5: StopMovement
void ARealmMoveController::GameEnded()
{
StopMovement();
GetWorldTimerManager().ClearAllTimersForObject(this);
AGameCharacter* gc = Cast<AGameCharacter>(GetCharacter());
if (IsValid(gc))
{
gc->StopAutoAttack();
gc->GetCharacterMovement()->SetMovementMode(MOVE_None);
}
}
示例6: GetWorldTimerManager
void ALobbyBeaconState::PostInitializeComponents()
{
Super::PostInitializeComponents();
if (Role == ROLE_Authority)
{
FTimerDelegate TimerDelegate = FTimerDelegate::CreateUObject(this, &ALobbyBeaconState::OneSecTick);
GetWorldTimerManager().SetTimer(OneSecTimerHandle, TimerDelegate, 1.0f, true);
LastTickTime = FPlatformTime::Seconds();
}
}
示例7: OnRep_Armed
void ABomb::OnProjectileBounce(const FHitResult& ImpactResult, const FVector& ImpactVelocity)
{
if (Role == ROLE_Authority)
{
Armed = true;
// You must call the rep function yourself for the server or it will never change color.
OnRep_Armed();
GetWorldTimerManager().SetTimer(BombTimerHandle, this, &ABomb::OnFuseExpired,FuseTime, false);
}
}
示例8: GetWorldTimerManager
void ALevelBounds::SubscribeToUpdateEvents()
{
if (bSubscribedToEvents == false && GIsEditor && !GetWorld()->IsPlayInEditor())
{
GetWorldTimerManager().SetTimer(this, &ALevelBounds::OnTimerTick, 1, true);
GEngine->OnActorMoved().AddUObject(this, &ALevelBounds::OnLevelActorMoved);
GEngine->OnLevelActorDeleted().AddUObject(this, &ALevelBounds::OnLevelActorAddedRemoved);
GEngine->OnLevelActorAdded().AddUObject(this, &ALevelBounds::OnLevelActorAddedRemoved);
bSubscribedToEvents = true;
}
}
示例9: GetWorldTimerManager
void ARageHUD::PostBeginPlay()
{
if (GetOwningPawn() && Cast<ARagePlayerCar>(GetOwningPawn()))
{
Cast<ARagePlayerCar>(GetOwningPawn())->TheHUD = this;
}
else
{
FTimerHandle MyHandle;
GetWorldTimerManager().SetTimer(MyHandle, this, &ARageHUD::PostBeginPlay, PostDelay, false);
}
}
示例10: toggleCastOngoing
void AManaJourneyCharacter::useShell()
{
if (characterClasses.Contains("whiteMageClass") && whiteMageClassRef && !castOngoing)
{
toggleCastOngoing();
bool bCastedShell = false;
bCastedShell = whiteMageClassRef->castShell(*this, GetMesh());
if (bCastedShell)
{
toggleCharacterMovement();
updatePhysicProtection();
castShellAnimation(level);
toggleCastOngoing();
//NOTE remove shell effect after fadeTimeForEffect has set to false (so add slight delay for beeing sure)
FTimerHandle UpdatePhysicProtectionTimer;
GetWorldTimerManager().ClearTimer(UpdatePhysicProtectionTimer);
FTimerDelegate UpdatePhysicProtectionTimerDelegate = FTimerDelegate::CreateUObject(this, &AManaJourneyCharacter::updatePhysicProtection);
GetWorldTimerManager().SetTimer(UpdatePhysicProtectionTimer, UpdatePhysicProtectionTimerDelegate, fadeTimeForEffect + 0.2f, false);
FTimerHandle EnableMovementTimer;
GetWorldTimerManager().ClearTimer(EnableMovementTimer);
FTimerDelegate updateCharacterMovementDelegate = FTimerDelegate::CreateUObject(this, &AManaJourneyCharacter::toggleCharacterMovement);
GetWorldTimerManager().SetTimer(EnableMovementTimer, updateCharacterMovementDelegate, 1.50f, false);
// timer for setting cast to false
FTimerHandle CastOngoingHandler;
GetWorldTimerManager().ClearTimer(CastOngoingHandler);
FTimerDelegate CastOngoingHandlerDelegate = FTimerDelegate::CreateUObject(this, &AManaJourneyCharacter::toggleCastOngoing);
GetWorldTimerManager().SetTimer(CastOngoingHandler, CastOngoingHandlerDelegate, whiteMageClassRef->fShellTimer, false);
}
}
}
示例11: OnRep_ElapsedTime
void AGameState::DefaultTimer()
{
if (IsMatchInProgress())
{
++ElapsedTime;
if (GetNetMode() != NM_DedicatedServer)
{
OnRep_ElapsedTime();
}
}
GetWorldTimerManager().SetTimer(TimerHandle_DefaultTimer, this, &AGameState::DefaultTimer, 1.0f / GetWorldSettings()->GetEffectiveTimeDilation(), true);
}
示例12: GetWorld
void ABaseWeapon::HandleFiring()
{
const float GameTime = GetWorld()->GetTimeSeconds();
if (LastFireTime > 0 && WeaponConfig.TimeBetweenShots > 0 && LastFireTime + WeaponConfig.TimeBetweenShots > GameTime)
{
GetWorldTimerManager().SetTimer(time_handler, this, &ABaseWeapon::Fire, LastFireTime + WeaponConfig.TimeBetweenShots - GameTime, false);
}
else
{
Fire();
}
}
示例13: GetWorld
void ASWeapon::OnBurstStarted()
{
const float GameTime = GetWorld()->GetTimeSeconds();
if ((LastFireTime > 0.0f) && (TimeBetweenShots > 0.0f) &&
(LastFireTime + TimeBetweenShots > GameTime))
{
GetWorldTimerManager().SetTimer(HandleFiringTimerHandle, this, &ASWeapon::HandleFiring, LastFireTime + TimeBetweenShots - GameTime, false);
}
else
{
HandleFiring();
}
}
示例14: SlowEnemy
void AIceSpell::DealUniqueSpellFunctionality(ABBotCharacter* enemyPlayer)
{
if (HasAuthority())
{
// Slow the enemy movement speed
SlowEnemy(enemyPlayer);
// Bind enemy player to SlowEnemyEnd delegate
slowMovementDelegate.BindUObject(this, &AIceSpell::SlowEnemyEnd, (ABBotCharacter*)enemyPlayer);
// Remove the slow effect after the slow duration
GetWorldTimerManager().SetTimer(slowMovementHandler, slowMovementDelegate, slowDuration, false);
}
}
示例15: ServerSetAnimID
// Unequip curent weapon
void ARadeCharacter::UnEquipStart()
{
// Set Animation State
ServerSetAnimID(EAnimState::UnEquip);
if (TheWeapon)
{
// Set Delay of current weapon
FTimerHandle myHandle;
GetWorldTimerManager().SetTimer(myHandle, this, &ARadeCharacter::UnEquipEnd, TheWeapon->EquipTime, false);
}
else
{
// Set Default Delay
FTimerHandle myHandle;
GetWorldTimerManager().SetTimer(myHandle, this, &ARadeCharacter::UnEquipEnd, DefaultWeaponEquipDelay, false);
}
UpdateComponentsVisibility();
}