Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Fill out your copyright notice in the Description page of Project Settings.
- #pragma once
- #include "CoreMinimal.h"
- #include "GameFramework/Pawn.h"
- #include "InputActionValue.h"//Struct header file
- #include "Bird.generated.h"//This alwase needs to be last
- //Pointers foward declare
- class UCapsuleComponent;
- class USkeletalMeshComponent;
- class UInputMappingContext;
- class UInputAction;
- UCLASS()
- class SLASH_API ABird : public APawn
- {
- GENERATED_BODY()
- public:
- // Sets default values for this pawn's properties
- ABird();
- // 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;
- //void MoveForward(float Value);
- UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input);
- UInputMappingContext* BirdMappingContext;
- UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input);
- UInputAction* MoveAction;
- //call for movemnt
- void Move(const FInputActionValue& Value);//this is a pointer and cant be decaled
- //call for look
- //void Look(const FInputActionValue& Value);
- private:
- //UCapsuleComponent* SecondCapsule;//error this deeds to be declared using class first
- //class UCapsuleComponent* Capsule;// put class here if you dont want to foward declare
- UPROPERTY(VisibleAnywhere);
- UCapsuleComponent* Capsule;
- //UCapsuleComponent* SecondCapsule;
- UPROPERTY(VisibleAnywhere);
- USkeletalMeshComponent* BirdMesh;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement