// 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" class UCameraComponent; class UFloatingPawnMovement; UCLASS() class PRESIDENTSBRIGADE_API ABasePawn : public APawn { GENERATED_BODY() public: // Sets default values for this pawn's properties ABasePawn(const FObjectInitializer &object_initializer); // Called every frame virtual void Tick(float DeltaTime) override; // Called to bind functionality to input virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override; protected: // Called when the game starts or when spawned virtual void BeginPlay() override; virtual UPawnMovementComponent* GetMovementComponent() const; UPROPERTY(EditAnywhere, Category="Player") UCameraComponent* main_camera; UPROPERTY(EditAnywhere, Category="Player") UStaticMeshComponent* player_mesh; UPROPERTY(EditAnywhere, Category="Player") UFloatingPawnMovement* movement_component; private: USceneComponent* root_component; void handle_move_right(float axis); void handle_move_forward(float axis); };