Advertisement
Dieton

Bird.h

Nov 8th, 2023 (edited)
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.60 KB | Gaming | 0 0
  1. // Fill out your copyright notice in the Description page of Project Settings.
  2.  
  3. #pragma once
  4.  
  5. #include "CoreMinimal.h"
  6. #include "GameFramework/Pawn.h"
  7.  
  8. #include "InputActionValue.h"//Struct header file
  9.  
  10. #include "Bird.generated.h"//This alwase needs to be last
  11.  
  12. //Pointers foward declare
  13. class UCapsuleComponent;
  14. class USkeletalMeshComponent;
  15. class UInputMappingContext;
  16. class UInputAction;
  17.  
  18. UCLASS()
  19. class SLASH_API ABird : public APawn
  20. {
  21.     GENERATED_BODY()
  22.  
  23. public:
  24.     // Sets default values for this pawn's properties
  25.     ABird();
  26.  
  27.     // Called every frame
  28.     virtual void Tick(float DeltaTime) override;
  29.     // Called to bind functionality to input
  30.     virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
  31.  
  32. protected:
  33.     // Called when the game starts or when spawned
  34.     virtual void BeginPlay() override;
  35.     //void MoveForward(float Value);
  36.  
  37.     UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input);
  38.     UInputMappingContext* BirdMappingContext;
  39.  
  40.     UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input);
  41.     UInputAction* MoveAction;
  42.  
  43.     //call for movemnt
  44.     void Move(const FInputActionValue& Value);//this is a pointer and cant be decaled
  45.     //call for look
  46.     //void Look(const FInputActionValue& Value);
  47.  
  48. private:
  49.  
  50.     //UCapsuleComponent* SecondCapsule;//error this deeds to be declared using class first
  51.     //class UCapsuleComponent* Capsule;// put class here if you dont want to foward declare
  52.     UPROPERTY(VisibleAnywhere);
  53.     UCapsuleComponent* Capsule;
  54.     //UCapsuleComponent* SecondCapsule;
  55.  
  56.     UPROPERTY(VisibleAnywhere);
  57.     USkeletalMeshComponent* BirdMesh;
  58. };
  59.  
Tags: ue5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement