Advertisement
Guest User

Laser.h

a guest
Dec 1st, 2020
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.61 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 "beam.h"
  8. #include "Components/ArrowComponent.h"
  9. #include "Colours.h"
  10. #include "Laser.generated.h"
  11.  
  12.  
  13.  
  14. UCLASS()
  15. class REFLECTIONPUZZLE_API ALaser : public AActor
  16. {
  17.     GENERATED_BODY()
  18.    
  19.  
  20.  
  21. public:
  22.     // Sets default values for this actor's properties
  23.     ALaser();
  24.  
  25.     FTimerHandle StartLaserTimer;
  26.  
  27.     UFUNCTION()
  28.         void StartCast();
  29.  
  30.     UPROPERTY()
  31.         class UMaterial* LaserMaterial;
  32.  
  33.     UPROPERTY(EditAnywhere)
  34.         TEnumAsByte<EColours> Colour;
  35.  
  36.     UPROPERTY(EditAnywhere, BlueprintReadWrite)
  37.         float Range = 99000;
  38.    
  39.     UPROPERTY(EditAnywhere, BlueprintReadWrite)
  40.         FVector Direction;
  41.  
  42.     UPROPERTY(EditAnywhere, BlueprintReadWrite)
  43.         ABeam* Beamref;
  44.  
  45.     UPROPERTY(EditAnywhere, BlueprintReadWrite)
  46.         FVector LaserStart;
  47.  
  48.     UPROPERTY(EditAnywhere, BlueprintReadWrite)
  49.         FVector LaserEnd;
  50.  
  51.     UPROPERTY(EditAnywhere, BlueprintReadWrite)
  52.         FVector Origin;
  53.  
  54.     UPROPERTY(EditAnywhere, BlueprintReadWrite)
  55.         bool SensorActive = false;
  56.  
  57.     UPROPERTY(VisibleDefaultsOnly, Category = Extras)
  58.         class UArrowComponent* Arrow1P;
  59.  
  60.     UPROPERTY(EditAnywhere, BlueprintReadWrite)
  61.         TArray<ABeam*> Lasers;
  62.  
  63.     UFUNCTION(BlueprintCallable)
  64.         void CastBeam(FVector LOrigin, FVector LDirection, float LDistance);
  65.  
  66.  
  67.    
  68. protected:
  69.     // Called when the game starts or when spawned
  70.     virtual void BeginPlay() override;
  71.  
  72. public:
  73.     // Called every frame
  74.     virtual void Tick(float DeltaTime) override;
  75.  
  76. private:
  77.  
  78.     //TArray<ABeam*> Lasers;
  79.     TArray<AActor*> FoundActors;
  80. };
  81.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement