mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 22:34:53 +08:00
Merge branch '3.6' into 3.7-beta
This commit is contained in:
commit
4b2d233807
2
.gitignore
vendored
2
.gitignore
vendored
@ -107,3 +107,5 @@ spine-ue4/SpineUE4.VC.opendb
|
||||
spine-ue4/SpineUE4.VC.db
|
||||
spine-ue4/SpineUE4.sln
|
||||
spine-ue4/SpineUE4.VC.db
|
||||
spine-ue4/.vs/
|
||||
spine-ue4/SpineUE4.VC.VC.opendb
|
||||
|
||||
BIN
spine-ue4/Content/GettingStarted/06-cpp.umap
Normal file
BIN
spine-ue4/Content/GettingStarted/06-cpp.umap
Normal file
Binary file not shown.
@ -6,7 +6,8 @@ public class SpineUE4 : ModuleRules
|
||||
{
|
||||
public SpineUE4(ReadOnlyTargetRules Target) : base(Target)
|
||||
{
|
||||
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });
|
||||
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "SpinePlugin" });
|
||||
PublicIncludePaths.AddRange(new string[] { "SpinePlugin/Public", "SpinePlugin/Classes" });
|
||||
|
||||
PrivateDependencyModuleNames.AddRange(new string[] { });
|
||||
|
||||
|
||||
37
spine-ue4/Source/SpineUE4/SpineboyCppPawn.cpp
Normal file
37
spine-ue4/Source/SpineUE4/SpineboyCppPawn.cpp
Normal file
@ -0,0 +1,37 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#include "SpineUE4.h"
|
||||
#include "SpineSkeletonAnimationComponent.h"
|
||||
#include "SpineboyCppPawn.h"
|
||||
|
||||
|
||||
// Sets default values
|
||||
ASpineboyCppPawn::ASpineboyCppPawn()
|
||||
{
|
||||
// Set this pawn to call Tick() every frame. You can turn this off to improve performance if you don't need it.
|
||||
PrimaryActorTick.bCanEverTick = true;
|
||||
|
||||
}
|
||||
|
||||
// Called when the game starts or when spawned
|
||||
void ASpineboyCppPawn::BeginPlay()
|
||||
{
|
||||
Super::BeginPlay();
|
||||
USpineSkeletonAnimationComponent* animation = FindComponentByClass<USpineSkeletonAnimationComponent>();
|
||||
animation->SetAnimation(0, FString("walk"), true);
|
||||
}
|
||||
|
||||
// Called every frame
|
||||
void ASpineboyCppPawn::Tick(float DeltaTime)
|
||||
{
|
||||
Super::Tick(DeltaTime);
|
||||
|
||||
}
|
||||
|
||||
// Called to bind functionality to input
|
||||
void ASpineboyCppPawn::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
|
||||
{
|
||||
Super::SetupPlayerInputComponent(PlayerInputComponent);
|
||||
|
||||
}
|
||||
|
||||
31
spine-ue4/Source/SpineUE4/SpineboyCppPawn.h
Normal file
31
spine-ue4/Source/SpineUE4/SpineboyCppPawn.h
Normal file
@ -0,0 +1,31 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "GameFramework/Pawn.h"
|
||||
#include "SpineboyCppPawn.generated.h"
|
||||
|
||||
UCLASS()
|
||||
class SPINEUE4_API ASpineboyCppPawn : public APawn
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
// Sets default values for this pawn's properties
|
||||
ASpineboyCppPawn();
|
||||
|
||||
protected:
|
||||
// Called when the game starts or when spawned
|
||||
virtual void BeginPlay() override;
|
||||
|
||||
public:
|
||||
// Called every frame
|
||||
virtual void Tick(float DeltaTime) override;
|
||||
|
||||
// Called to bind functionality to input
|
||||
virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
|
||||
|
||||
|
||||
|
||||
};
|
||||
Loading…
x
Reference in New Issue
Block a user