Advertisement
cgprojectsfx

Worker.h

Jun 22nd, 2019
409
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.43 KB | None | 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/Actor.h"
  7. #include "Engine/Classes/Components/StaticMeshComponent.h"
  8. #include "Engine/Classes/Components/InstancedStaticMeshComponent.h"
  9. #include "Populate_CPP_Spawner.h"
  10. #include "Populate_CPP_Worker.generated.h"
  11.  
  12. UCLASS()
  13. class ORVILLETREK_API APopulate_CPP_Worker : public AActor
  14. {
  15.     GENERATED_BODY()
  16.    
  17. public:
  18.     // Sets default values for this actor's properties
  19.     APopulate_CPP_Worker();
  20.  
  21.     // Spawner
  22.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Populate") 
  23.     APopulate_CPP_Spawner* PopulateSpawner;
  24.  
  25.     // Set Mesh    
  26.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Populate")
  27.     UStaticMesh * StaticMesh;
  28.  
  29.     // Transform
  30.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Populate")
  31.     FTransform Transformation;
  32.  
  33.     // Transform
  34.     UFUNCTION(BlueprintCallable, Category = "Populate")
  35.     virtual void CreateWorkerInstance();
  36.  
  37.     // Transform
  38.     UFUNCTION(BlueprintCallable, Category = "Populate")
  39.     virtual void AddInstance();
  40.  
  41. protected:
  42.     // Called when the game starts or when spawned
  43.     virtual void BeginPlay() override;
  44.  
  45. public:
  46.     // Called every frame
  47.     virtual void Tick(float DeltaTime) override;
  48.  
  49.  
  50. private:
  51.  
  52.     //private
  53.     AActor * InstancedActor;
  54.  
  55.     // Instance Static Mesh Component
  56.     UInstancedStaticMeshComponent* InstancedStaticMeshComponent;
  57.    
  58. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement