|
@@ -17,7 +17,7 @@ ASpineboyCppPawn::ASpineboyCppPawn()
|
|
void ASpineboyCppPawn::BeginPlay()
|
|
void ASpineboyCppPawn::BeginPlay()
|
|
{
|
|
{
|
|
Super::BeginPlay();
|
|
Super::BeginPlay();
|
|
- USpineSkeletonAnimationComponent* animation = FindComponentByClass<USpineSkeletonAnimationComponent>();
|
|
|
|
|
|
+ USpineSkeletonAnimationComponent* animation = FindComponentByClass<USpineSkeletonAnimationComponent>();
|
|
animation->SetAnimation(0, FString("walk"), true);
|
|
animation->SetAnimation(0, FString("walk"), true);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -25,7 +25,12 @@ void ASpineboyCppPawn::BeginPlay()
|
|
void ASpineboyCppPawn::Tick(float DeltaTime)
|
|
void ASpineboyCppPawn::Tick(float DeltaTime)
|
|
{
|
|
{
|
|
Super::Tick(DeltaTime);
|
|
Super::Tick(DeltaTime);
|
|
-
|
|
|
|
|
|
+ USpineSkeletonAnimationComponent* animation = FindComponentByClass<USpineSkeletonAnimationComponent>();
|
|
|
|
+ spine::AnimationState *state = animation->GetAnimationState();
|
|
|
|
+ spine::TrackEntry *entry = state->getCurrent(0);
|
|
|
|
+ if (entry) {
|
|
|
|
+ GEngine->AddOnScreenDebugMessage(-1, 0.5f, FColor::Yellow, FString(entry->getAnimation()->getName().buffer()));
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
// Called to bind functionality to input
|
|
// Called to bind functionality to input
|