From 8e95e46b976b14fc883d4bb045fa45631a34f664 Mon Sep 17 00:00:00 2001 From: 10000Je Date: Mon, 21 Apr 2025 21:45:17 +0900 Subject: [PATCH] =?UTF-8?q?=ED=95=98=EC=9C=84=20C++=20=ED=81=B4=EB=9E=98?= =?UTF-8?q?=EC=8A=A4=20=EC=83=9D=EC=84=B1=ED=95=98=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Content/Blueprints/Pawns/BP_PawnTank.uasset | 4 +-- Content/Maps/Main.umap | 4 +-- Source/ToonTanks/Tank.cpp | 16 ++++++++++++ Source/ToonTanks/Tank.h | 27 +++++++++++++++++++++ 4 files changed, 47 insertions(+), 4 deletions(-) create mode 100644 Source/ToonTanks/Tank.cpp create mode 100644 Source/ToonTanks/Tank.h diff --git a/Content/Blueprints/Pawns/BP_PawnTank.uasset b/Content/Blueprints/Pawns/BP_PawnTank.uasset index acfe9c4..bc2d27f 100644 --- a/Content/Blueprints/Pawns/BP_PawnTank.uasset +++ b/Content/Blueprints/Pawns/BP_PawnTank.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:20781926873d454bd2d5f1e89bef3dc09a718c1c1d65fb92aecc2016ac52dadf -size 36536 +oid sha256:4c67315bcfdce3f51adc1b4103b35dd7806a5041d11e263623e56864655757e2 +size 37613 diff --git a/Content/Maps/Main.umap b/Content/Maps/Main.umap index b8516ce..05cbc75 100644 --- a/Content/Maps/Main.umap +++ b/Content/Maps/Main.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:38f81d91cd094d32ea019042d3107a9e69865f0690f0fad4a4e5d0a3f11e70a3 -size 94250 +oid sha256:a7a05ce777ff2331447e5d357e01e52ac1aae870815bb0941652b256b1e5b071 +size 94319 diff --git a/Source/ToonTanks/Tank.cpp b/Source/ToonTanks/Tank.cpp new file mode 100644 index 0000000..1dd3652 --- /dev/null +++ b/Source/ToonTanks/Tank.cpp @@ -0,0 +1,16 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "Tank.h" + +#include "Camera/CameraComponent.h" +#include "GameFramework/SpringArmComponent.h" + +ATank::ATank() +{ + SpringArm = CreateDefaultSubobject(TEXT("SpringArm")); + SpringArm->SetupAttachment(RootComponent); + + Camera = CreateDefaultSubobject(TEXT("Camera")); + Camera->SetupAttachment(SpringArm); +} diff --git a/Source/ToonTanks/Tank.h b/Source/ToonTanks/Tank.h new file mode 100644 index 0000000..81ef6d9 --- /dev/null +++ b/Source/ToonTanks/Tank.h @@ -0,0 +1,27 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "BasePawn.h" +#include "Tank.generated.h" + +/** + * + */ +UCLASS() +class TOONTANKS_API ATank : public ABasePawn +{ + GENERATED_BODY() + +public: + ATank(); + +private: + UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Component", meta=(AllowPrivateAccess = "true")) + class USpringArmComponent* SpringArm; + + UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Component", meta=(AllowPrivateAccess = "true")) + class UCameraComponent* Camera; + +};