Ver Fonte

Merge branch '3.6' into 3.7-beta

badlogic há 8 anos atrás
pai
commit
4b2d233807

+ 2 - 0
.gitignore

@@ -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


+ 2 - 1
spine-ue4/Source/SpineUE4/SpineUE4.Build.cs

@@ -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 - 0
spine-ue4/Source/SpineUE4/SpineboyCppPawn.cpp

@@ -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 - 0
spine-ue4/Source/SpineUE4/SpineboyCppPawn.h

@@ -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;
+
+	
+	
+};