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 "MyPawn.generated.h"//This alwase needs to be last
- //Pointers foward declare
- class UCapsuleComponent;
- class USkeletalMeshComponent;
- class UInputMappingContext;
- class UInputAction;
- UCLASS()
- class THIRDPERSONBLUE_API AMyPawn : public APawn
- {
- GENERATED_BODY()
- public:
- // Sets default values for this pawn's properties
- AMyPawn();
- // 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;
- /*These are all variables
- UPROPERTY(EditerVisStates) or,
- UPROPERTY(EditerVisStates, BlueprintVisStates) or,
- UPROPERTY(BlueprintVisStates)
- EditerVisStates:
- VisibleAnywhere -internal and external view but not editable
- VisibleInstanceOnly
- VisibleDefaultsOnly
- EditDefaultsOnly -internal blueprint view editable
- EditInstanceOnly -My Perferd Visability editable
- EditAnywhere - editable from anywhere
- BlueprintVisStates:
- BlueprintReadWrite
- BlueprintReadOnly
- BlueprintWriteOnly
- */
- /*These are functions
- UFUNCTION(BlueprintCallable)//input exicution panel
- UFUNCTION(BlueprintPure)//Pure function
- */
- // Called when the game starts or when spawned
- virtual void BeginPlay() override;
- //UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Cat")
- //float catSpeed = 1.f;
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Sine Parameters")
- float Amplitude = 0.25f;
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Sine Parameters")
- float TimeConstant = 5.f;
- UFUNCTION(BlueprintPure)
- float TransformedSin();
- UFUNCTION(BlueprintPure)
- float TransformCos();
- template<typename T>
- T Avg(T First, T Second);
- };
- template<typename T>
- inline T AItem::Avg(T First, T Second)
- {
- return (First + Second) / 2;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement