mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-20 08:46:43 +08:00
[cpp][ue4] Attempted fix for linker errors in UE4.
This commit is contained in:
parent
90112276d4
commit
8de7a66920
@ -65,11 +65,7 @@ enum TextureWrap {
|
||||
TextureWrap_Repeat
|
||||
};
|
||||
|
||||
class
|
||||
#ifdef SPINE_UE4
|
||||
SPINEPLUGIN_API
|
||||
#endif
|
||||
AtlasPage : public SpineObject, public HasRendererObject {
|
||||
class AtlasPage : public SpineObject, public HasRendererObject {
|
||||
public:
|
||||
String name;
|
||||
Format format;
|
||||
@ -87,11 +83,7 @@ public:
|
||||
virtual ~AtlasPage() { }
|
||||
};
|
||||
|
||||
class
|
||||
#ifdef SPINE_UE4
|
||||
SPINEPLUGIN_API
|
||||
#endif
|
||||
AtlasRegion : public SpineObject {
|
||||
class AtlasRegion : public SpineObject {
|
||||
public:
|
||||
AtlasPage *page;
|
||||
String name;
|
||||
@ -107,11 +99,7 @@ public:
|
||||
|
||||
class TextureLoader;
|
||||
|
||||
class
|
||||
#ifdef SPINE_UE4
|
||||
SPINEPLUGIN_API
|
||||
#endif
|
||||
Atlas : public SpineObject {
|
||||
class Atlas : public SpineObject {
|
||||
public:
|
||||
Atlas(const String &path, TextureLoader *textureLoader);
|
||||
|
||||
|
||||
@ -34,10 +34,12 @@
|
||||
#include <new>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <spine/dll.h>
|
||||
|
||||
namespace spine {
|
||||
class String;
|
||||
|
||||
class SpineObject {
|
||||
class SP_API SpineObject {
|
||||
public:
|
||||
void *operator new(size_t sz);
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ ASpineboyCppPawn::ASpineboyCppPawn()
|
||||
void ASpineboyCppPawn::BeginPlay()
|
||||
{
|
||||
Super::BeginPlay();
|
||||
USpineSkeletonAnimationComponent* animation = FindComponentByClass<USpineSkeletonAnimationComponent>();
|
||||
USpineSkeletonAnimationComponent* animation = FindComponentByClass<USpineSkeletonAnimationComponent>();
|
||||
animation->SetAnimation(0, FString("walk"), true);
|
||||
}
|
||||
|
||||
@ -25,7 +25,12 @@ void ASpineboyCppPawn::BeginPlay()
|
||||
void ASpineboyCppPawn::Tick(float 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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user