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/Actor.h"
- #include "beam.h"
- #include "Components/ArrowComponent.h"
- #include "Colours.h"
- #include "Laser.generated.h"
- UCLASS()
- class REFLECTIONPUZZLE_API ALaser : public AActor
- {
- GENERATED_BODY()
- public:
- // Sets default values for this actor's properties
- ALaser();
- FTimerHandle StartLaserTimer;
- UFUNCTION()
- void StartCast();
- UPROPERTY()
- class UMaterial* LaserMaterial;
- UPROPERTY(EditAnywhere)
- TEnumAsByte<EColours> Colour;
- UPROPERTY(EditAnywhere, BlueprintReadWrite)
- float Range = 99000;
- UPROPERTY(EditAnywhere, BlueprintReadWrite)
- FVector Direction;
- UPROPERTY(EditAnywhere, BlueprintReadWrite)
- ABeam* Beamref;
- UPROPERTY(EditAnywhere, BlueprintReadWrite)
- FVector LaserStart;
- UPROPERTY(EditAnywhere, BlueprintReadWrite)
- FVector LaserEnd;
- UPROPERTY(EditAnywhere, BlueprintReadWrite)
- FVector Origin;
- UPROPERTY(EditAnywhere, BlueprintReadWrite)
- bool SensorActive = false;
- UPROPERTY(VisibleDefaultsOnly, Category = Extras)
- class UArrowComponent* Arrow1P;
- UPROPERTY(EditAnywhere, BlueprintReadWrite)
- TArray<ABeam*> Lasers;
- UFUNCTION(BlueprintCallable)
- void CastBeam(FVector LOrigin, FVector LDirection, float LDistance);
- protected:
- // Called when the game starts or when spawned
- virtual void BeginPlay() override;
- public:
- // Called every frame
- virtual void Tick(float DeltaTime) override;
- private:
- //TArray<ABeam*> Lasers;
- TArray<AActor*> FoundActors;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement