Add basic class files
This commit is contained in:
44
Source/MyProject3/SpaceshipPawn.h
Normal file
44
Source/MyProject3/SpaceshipPawn.h
Normal file
@@ -0,0 +1,44 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "GameFramework/Pawn.h"
|
||||
#include "SpaceshipPawn.generated.h"
|
||||
|
||||
UCLASS()
|
||||
class MYPROJECT3_API ASpaceshipPawn : public APawn
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
ASpaceshipPawn();
|
||||
virtual void Tick(float DeltaTime) override;
|
||||
virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
|
||||
|
||||
protected:
|
||||
virtual void BeginPlay() override;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components")
|
||||
class UStaticMeshComponent* ShipMesh;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components")
|
||||
class USpringArmComponent* CameraSpringArm;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components")
|
||||
class UCameraComponent* Camera;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Movement")
|
||||
float MovementSpeed = 1000.0f;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Movement")
|
||||
float RotationSpeed = 100.0f;
|
||||
|
||||
// Movement functions
|
||||
void MoveForward(float Value);
|
||||
void MoveRight(float Value);
|
||||
void Turn(float Value);
|
||||
void LookUp(float Value);
|
||||
void Fire();
|
||||
|
||||
private:
|
||||
FVector CurrentVelocity;
|
||||
};
|
||||
Reference in New Issue
Block a user