mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[ue4] Ported flipX/flipY -> scaleX/scaleY change. See #1142.
This commit is contained in:
parent
84dcd6ba25
commit
77d495bc6d
@ -136,26 +136,26 @@ void USpineSkeletonComponent::SetSlotsToSetupPose () {
|
|||||||
if (skeleton) spSkeleton_setSlotsToSetupPose(skeleton);
|
if (skeleton) spSkeleton_setSlotsToSetupPose(skeleton);
|
||||||
}
|
}
|
||||||
|
|
||||||
void USpineSkeletonComponent::SetFlipX (bool flipX) {
|
void USpineSkeletonComponent::SetScaleX (float scaleX) {
|
||||||
CheckState();
|
CheckState();
|
||||||
if (skeleton) skeleton->flipX = flipX ? 1 : 0;
|
if (skeleton) skeleton->scaleX = scaleX;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool USpineSkeletonComponent::GetFlipX() {
|
float USpineSkeletonComponent::GetScaleX() {
|
||||||
CheckState();
|
CheckState();
|
||||||
if (skeleton) return skeleton->flipX != 0;
|
if (skeleton) return skeleton->scaleX;
|
||||||
return false;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void USpineSkeletonComponent::SetFlipY(bool flipY) {
|
void USpineSkeletonComponent::SetScaleY(float scaleY) {
|
||||||
CheckState();
|
CheckState();
|
||||||
if (skeleton) skeleton->flipY = flipY ? 1 : 0;
|
if (skeleton) skeleton->scaleY = scaleY;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool USpineSkeletonComponent::GetFlipY() {
|
float USpineSkeletonComponent::GetScaleY() {
|
||||||
CheckState();
|
CheckState();
|
||||||
if (skeleton) return skeleton->flipY != 0;
|
if (skeleton) return skeleton->scaleY;
|
||||||
return false;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void USpineSkeletonComponent::BeginPlay() {
|
void USpineSkeletonComponent::BeginPlay() {
|
||||||
|
|||||||
@ -79,16 +79,16 @@ public:
|
|||||||
void SetSlotsToSetupPose();
|
void SetSlotsToSetupPose();
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, Category = "Components|Spine|Skeleton")
|
UFUNCTION(BlueprintCallable, Category = "Components|Spine|Skeleton")
|
||||||
void SetFlipX(bool flipX);
|
void SetScaleX(float scaleX);
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, Category = "Components|Spine|Skeleton")
|
UFUNCTION(BlueprintCallable, Category = "Components|Spine|Skeleton")
|
||||||
bool GetFlipX();
|
float GetScaleX();
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, Category = "Components|Spine|Skeleton")
|
UFUNCTION(BlueprintCallable, Category = "Components|Spine|Skeleton")
|
||||||
void SetFlipY(bool flipY);
|
void SetScaleY(float scaleY);
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, Category = "Components|Spine|Skeleton")
|
UFUNCTION(BlueprintCallable, Category = "Components|Spine|Skeleton")
|
||||||
bool GetFlipY();
|
float GetScaleY();
|
||||||
|
|
||||||
UPROPERTY(BlueprintAssignable, Category = "Components|Spine|Skeleton")
|
UPROPERTY(BlueprintAssignable, Category = "Components|Spine|Skeleton")
|
||||||
FSpineBeforeUpdateWorldTransformDelegate BeforeUpdateWorldTransform;
|
FSpineBeforeUpdateWorldTransformDelegate BeforeUpdateWorldTransform;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user