コード例 #1
0
void UARActionStateCooldown::Tick(float DeltaTime)
{
	if (IsOnCooldown)
	{
		CurrentCooldownTime += DeltaTime;
		float ActionCooldownTime = GetOuterUARActionStateComponent()->ActionCooldownTime;
		if (CurrentCooldownTime >= ActionCooldownTime)
		{
			CooldownEnded();
			GetOuterUARActionStateComponent()->GotoState(GetOuterUARActionStateComponent()->ActiveState);
		}
	}
}
コード例 #2
0
void UARActionStateFiring::Tick(float DeltaTime)
{
	if (FireStarted)
	{
		CurrentIntervalTime += DeltaTime;
		if (CurrentIntervalTime >= GetOuterUARActionStateComponent()->IntervalTime)
		{
			GetOuterUARActionStateComponent()->ActionInterval();
			//IsFirstFire = false;
			CurrentIntervalTime = 0;
		}
	}
}
コード例 #3
0
void UARActionStateCooldown::CooldownEnded()
{
	GetOuterUARActionStateComponent()->CooldownEnded();
}
コード例 #4
0
void UARActionStateCooldown::BeginState(UARActionState* PrevState)
{
	GetOuterUARActionStateComponent()->CooldownBegin();
	IsOnCooldown = true;
}
コード例 #5
0
void UARActionStateFiring::EndActionSequence()
{
	GetOuterUARActionStateComponent()->GotoState(GetOuterUARActionStateComponent()->RefireState);
}
コード例 #6
0
void UARActionStateFiring::EndState()
{
	FireStarted = false;
	GetOuterUARActionStateComponent()->CastEnd();
	CurrentIntervalTime = 0;
}
コード例 #7
0
void UARActionStateFiring::BeginState(UARActionState* PrevState)
{
	GetOuterUARActionStateComponent()->CastBegin();
	//GetOuterUARActionStateComponent()->IsCasting = false;
	FireStarted = true;
}