mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Changed variable animation -> animationComponent in SpineboyCppPawn.cpp (#2344)
This commit is contained in:
parent
6ec9637ed6
commit
d041e9e39c
@ -14,15 +14,15 @@ ASpineboyCppPawn::ASpineboyCppPawn() {
|
|||||||
// Called when the game starts or when spawned
|
// Called when the game starts or when spawned
|
||||||
void ASpineboyCppPawn::BeginPlay() {
|
void ASpineboyCppPawn::BeginPlay() {
|
||||||
Super::BeginPlay();
|
Super::BeginPlay();
|
||||||
USpineSkeletonAnimationComponent *animation = FindComponentByClass<USpineSkeletonAnimationComponent>();
|
USpineSkeletonAnimationComponent *animationComponent = FindComponentByClass<USpineSkeletonAnimationComponent>();
|
||||||
animation->SetAnimation(0, FString("walk"), true);
|
animationComponent->SetAnimation(0, FString("walk"), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called every frame
|
// Called every frame
|
||||||
void ASpineboyCppPawn::Tick(float DeltaTime) {
|
void ASpineboyCppPawn::Tick(float DeltaTime) {
|
||||||
Super::Tick(DeltaTime);
|
Super::Tick(DeltaTime);
|
||||||
USpineSkeletonAnimationComponent *animation = FindComponentByClass<USpineSkeletonAnimationComponent>();
|
USpineSkeletonAnimationComponent *animationComponent = FindComponentByClass<USpineSkeletonAnimationComponent>();
|
||||||
spine::AnimationState *state = animation->GetAnimationState();
|
spine::AnimationState *state = animationComponent->GetAnimationState();
|
||||||
spine::TrackEntry *entry = state->getCurrent(0);
|
spine::TrackEntry *entry = state->getCurrent(0);
|
||||||
if (entry) {
|
if (entry) {
|
||||||
GEngine->AddOnScreenDebugMessage(-1, 0.5f, FColor::Yellow, FString(entry->getAnimation()->getName().buffer()));
|
GEngine->AddOnScreenDebugMessage(-1, 0.5f, FColor::Yellow, FString(entry->getAnimation()->getName().buffer()));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user