2025-04-29 00:10:36 +09:00

47 lines
1.4 KiB
C++

// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Pawn.h"
#include "BasePawn.generated.h"
UCLASS()
class TOONTANKS_API ABasePawn : public APawn
{
GENERATED_BODY()
public:
// Sets default values for this pawn's properties
ABasePawn();
protected:
// Rotate Turret to Target Location
void RotateTurret(FVector LookAtTarget);
// Fire Projectile at Projectile Spawn Point
void Fire();
private:
// CapsuleComponent for RootComponent
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Component", meta=(AllowPrivateAccess = "true"))
class UCapsuleComponent* CapsuleComp;
// Static Mesh Component of Tank Base
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Component", meta=(AllowPrivateAccess = "true"))
UStaticMeshComponent* BaseMesh;
// Static Mesh Component of Rotating part of Tank
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Component", meta=(AllowPrivateAccess = "true"))
UStaticMeshComponent* TurretMesh;
// Scene Component of Projectile Spawn Point
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Component", meta=(AllowPrivateAccess = "true"))
USceneComponent* ProjectileSpawnPoint;
// UClass Pointer for Spawn Projectile
UPROPERTY(EditDefaultsOnly, Category = "Combat")
TSubclassOf<class AProjectile> ProjectileClass;
};