Removed 'autofinish' from the animation C++ system, replaced it with more elegant implementation in blueprint.
This commit is contained in:
@@ -42,8 +42,8 @@ void UlxTangible::DeleteCurrentActor()
|
||||
CurrentActor->Rename(nullptr);
|
||||
CurrentActor->Destroy();
|
||||
|
||||
// If this actor previously was posessed by a player controller,
|
||||
// then it's not posessed anymore, because there is no actor any more.
|
||||
// If this actor previously was possessed by a player controller,
|
||||
// then it's not possessed anymore, because there is no actor any more.
|
||||
if (Manager->PossessedTangible == this) {
|
||||
Manager->PossessedTangible = nullptr;
|
||||
};
|
||||
@@ -242,6 +242,12 @@ void UlxTangible::FinishedAnimation(AActor *target, const FlxAnimationStep &step
|
||||
UE_LOG(LogLuprex, Display, TEXT("Animation Finished: %s"), *DebugString);
|
||||
}
|
||||
|
||||
bool UlxTangible::AnimationStepIsFinished(AActor *target, const FlxAnimationStep &step) {
|
||||
UlxTangible *tan = GetActorTangibleOrLog(target);
|
||||
if (tan == nullptr) return true;
|
||||
return tan->AnimTracker.IsFinished(step.Hash);
|
||||
}
|
||||
|
||||
FString UlxTangible::GetTangiblePlane(AActor* target) {
|
||||
UlxTangible *tan = GetActorTangibleOrLog(target);
|
||||
if (tan == nullptr) return TEXT("");
|
||||
@@ -266,9 +272,3 @@ bool UlxTangible::IsLuprexTangible(AActor* target) {
|
||||
return tan != nullptr;
|
||||
}
|
||||
|
||||
void UlxTangible::SetAutoFinish(AActor *target, const FString &action, const FVector &xyz) {
|
||||
UlxTangible *tan = GetActorTangibleOrLog(target);
|
||||
if (tan == nullptr) return;
|
||||
tan->AnimTracker.SetAutoFinish(action, xyz);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user