Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //MyActor.h
- // Fill out your copyright notice in the Description page of Project Settings.
- #pragma once
- #include "CoreMinimal.h"
- #include "GameFramework/Actor.h"
- #include "MyActor.generated.h"
- UCLASS()
- class THIRDPERSONTEST_1_API AMyActor : public AActor
- {
- GENERATED_BODY()
- public:
- // Sets default values for this actor's properties
- AMyActor();
- protected:
- // Called when the game starts or when spawned
- virtual void BeginPlay() override;
- APawn *player = nullptr;
- public:
- // Called every frame
- virtual void Tick(float DeltaTime) override;
- UFUNCTION(BlueprintCallable, Category = "My Input")
- void OnFire();
- UFUNCTION(BlueprintCallable, Category = "My Input")
- void OnAim();
- UFUNCTION(BlueprintCallable, Category = "My Input")
- void OnNoAim();
- UPROPERTY(EditAnywhere, BlueprintReadWrite)
- int32 salute = 999;
- };
- ///////////////////////////
- MyActor.cpp
- // Fill out your copyright notice in the Description page of Project Settings.
- #pragma once
- #include "CoreMinimal.h"
- #include "GameFramework/Actor.h"
- #include "MyActor.generated.h"
- UCLASS()
- class THIRDPERSONTEST_1_API AMyActor : public AActor
- {
- GENERATED_BODY()
- public:
- // Sets default values for this actor's properties
- AMyActor();
- protected:
- // Called when the game starts or when spawned
- virtual void BeginPlay() override;
- APawn *player = nullptr;
- public:
- // Called every frame
- virtual void Tick(float DeltaTime) override;
- UFUNCTION(BlueprintCallable, Category = "My Input")
- void OnFire();
- UFUNCTION(BlueprintCallable, Category = "My Input")
- void OnAim();
- UFUNCTION(BlueprintCallable, Category = "My Input")
- void OnNoAim();
- UPROPERTY(EditAnywhere, BlueprintReadWrite)
- int32 salute = 999;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement