当前位置: 首页>>代码示例>>C++>>正文


C++ GetWorldTimerManager函数代码示例

本文整理汇总了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);
		}
	}
}
开发者ID:hoelzl,项目名称:Rade,代码行数:13,代码来源:LevelBlock.cpp

示例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);

}
开发者ID:SirTrav,项目名称:Unreal-Projects,代码行数:12,代码来源:BatteryPickup.cpp

示例3: StopSimulatingWeaponFire

void ASWeapon::OnBurstFinished()
{
	BurstCounter = 0;

	if (GetNetMode() != NM_DedicatedServer)
	{
		StopSimulatingWeaponFire();
	}

	GetWorldTimerManager().ClearTimer(TimerHandle_HandleFiring);
	bRefiring = false;
}
开发者ID:Raynaron,项目名称:EpicSurvivalGameSeries,代码行数:12,代码来源:SWeapon.cpp

示例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();
	}
}
开发者ID:SRombauts,项目名称:UE4QuickStart,代码行数:12,代码来源:Countdown.cpp

示例5: StopMovement

void ARealmMoveController::GameEnded()
{
	StopMovement();
	GetWorldTimerManager().ClearAllTimersForObject(this);

	AGameCharacter* gc = Cast<AGameCharacter>(GetCharacter());
	if (IsValid(gc))
	{
		gc->StopAutoAttack();
		gc->GetCharacterMovement()->SetMovementMode(MOVE_None);
	}
}
开发者ID:MatrIsCool,项目名称:Mythos-Realm,代码行数:12,代码来源:RealmMoveController.cpp

示例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();
	}
}
开发者ID:frobro98,项目名称:UnrealSource,代码行数:12,代码来源:LobbyBeaconState.cpp

示例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);
	}
}
开发者ID:marcthenarc,项目名称:NetGameCPP,代码行数:12,代码来源:Bomb.cpp

示例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;
	}
}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:12,代码来源:LevelBounds.cpp

示例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);
	}
}
开发者ID:vagenv,项目名称:RageRacing,代码行数:12,代码来源:RageHUD.cpp

示例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);
		}
	}
}
开发者ID:xhallix,项目名称:UnrealEngine_Manajourney,代码行数:33,代码来源:ManaJourneyCharacter.cpp

示例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);
}
开发者ID:colwalder,项目名称:unrealengine,代码行数:13,代码来源:GameState.cpp

示例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();
	}
}
开发者ID:ZerosGames,项目名称:FightKillWin,代码行数:13,代码来源:BaseWeapon.cpp

示例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();
	}
}
开发者ID:enki390,项目名称:SurvivalGameStudy,代码行数:13,代码来源:SWeapon.cpp

示例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);
  }
}
开发者ID:Lawrence-Abadier,项目名称:UEProject,代码行数:13,代码来源:IceSpell.cpp

示例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();

}
开发者ID:dcyoung,项目名称:Rade,代码行数:23,代码来源:RadeCharacter.cpp


注:本文中的GetWorldTimerManager函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。