changes updated
This commit is contained in:
Binary file not shown.
Binary file not shown.
BIN
Content/Blueprints/Pawns/BP_Tank.uasset
Normal file
BIN
Content/Blueprints/Pawns/BP_Tank.uasset
Normal file
Binary file not shown.
Binary file not shown.
15
Source/ToonTanks/Tank.cpp
Normal file
15
Source/ToonTanks/Tank.cpp
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
|
||||||
|
#include "Tank.h"
|
||||||
|
#include "GameFramework/SpringArmComponent.h"
|
||||||
|
#include "Camera/CameraComponent.h"
|
||||||
|
|
||||||
|
ATank::ATank()
|
||||||
|
{
|
||||||
|
SpringArm = CreateDefaultSubobject<USpringArmComponent>(TEXT("Spring Arm"));
|
||||||
|
SpringArm->SetupAttachment(RootComponent);
|
||||||
|
|
||||||
|
Camera = CreateDefaultSubobject<UCameraComponent>(TEXT("Camera"));
|
||||||
|
Camera->SetupAttachment(SpringArm);
|
||||||
|
}
|
||||||
26
Source/ToonTanks/Tank.h
Normal file
26
Source/ToonTanks/Tank.h
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
// 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, Category = "Components")
|
||||||
|
class USpringArmComponent* SpringArm;
|
||||||
|
|
||||||
|
UPROPERTY(VisibleAnywhere, Category = "Components")
|
||||||
|
class UCameraComponent* Camera;
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user