#pragma once #include "M4_Projectile.h" #include "CoreMinimal.h" #include "GameFramework/Pawn.h" #include "InputAction.h" #include "M4_PlayerPawn.generated.h" class UCameraComponent; UCLASS() class AM4_PlayerPawn : public APawn { GENERATED_BODY() public: AM4_PlayerPawn(); virtual void BeginPlay() override; virtual void Tick(float DeltaTime) override; virtual void SetupPlayerInputComponent(UInputComponent* PlayerInputComponent) override; void Move(const FInputActionInstance& Instance); void Shoot(const FInputActionInstance& Inst); protected: UPROPERTY(VisibleAnywhere) UStaticMeshComponent* MeshComponent; UPROPERTY() UInputAction* MoveAction; UPROPERTY() UInputAction* ShootAction; UPROPERTY(VisibleAnywhere) AM4_Projectile* Proj; UPROPERTY(VisibleAnywhere) TObjectPtr Projection; //bool HasShot = false; float MoveSpeed = 500.f; FVector2D MeshScale = FVector2D(0.6f, 0.5f); FVector2D LastMoveValue = FVector2D::ZeroVector; };