Adds initial project structure and core classes
Sets up the initial Unreal Engine project structure. Includes the creation of core classes such as: - A custom GameMode - A PlayerController - A PlayerPawn - A Centipede Pawn Also configures Git integration and includes a default level.
This commit is contained in:
43
Source/M4_CPP/public/M4_PlayerPawn.h
Normal file
43
Source/M4_CPP/public/M4_PlayerPawn.h
Normal file
@@ -0,0 +1,43 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "GameFramework/Pawn.h"
|
||||
#include "InputAction.h"
|
||||
#include "Components/StaticMeshComponent.h"
|
||||
#include "EnhancedInputComponent.h"
|
||||
#include "EnhancedInputSubsystems.h"
|
||||
#include "M4_PlayerPawn.generated.h"
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS()
|
||||
class M4_CPP_API AM4_PlayerPawn : public APawn
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public :
|
||||
AM4_PlayerPawn();
|
||||
|
||||
virtual void Tick(float DeltaTime) override;
|
||||
|
||||
UStaticMeshComponent* GetMeshComponent() const { return MeshComponent; }
|
||||
|
||||
virtual void SetupPlayerInputComponent(UInputComponent* PlayerInputComponent) override;
|
||||
|
||||
UPROPERTY(EditAnywhere, Category="centipede")
|
||||
TObjectPtr<UInputAction> MoveAction;
|
||||
|
||||
protected:
|
||||
virtual void BeginPlay() override;
|
||||
|
||||
private:
|
||||
|
||||
UPROPERTY(Category = "Centipede", VisibleAnywhere, BlueprintReadOnly, meta = (AllowPrivateAccess = "true"))
|
||||
TObjectPtr<UStaticMeshComponent> MeshComponent;
|
||||
|
||||
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user