Skip to content

Instantly share code, notes, and snippets.

@lobotomiac
Created November 11, 2017 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lobotomiac/52312892a4b99438976d918a5d21a3c3 to your computer and use it in GitHub Desktop.
Save lobotomiac/52312892a4b99438976d918a5d21a3c3 to your computer and use it in GitHub Desktop.
// nemozenitkodirnitovo
#pragma once
#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "Engine/TriggerVolume.h"
#include "CloseDoor.generated.h"
UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class ESCAPEROOM_API UCloseDoor : public UActorComponent
{
GENERATED_BODY()
public:
// Sets default values for this component's properties
UCloseDoor();
protected:
// Called when the game starts
virtual void BeginPlay() override;
void CloseDoor();
public:
// Called every frame
virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
private:
UPROPERTY(EditAnywhere)
ATriggerVolume *PressurePlate = NULL;
UPROPERTY(EditAnywhere)
AActor *ActorThatCloses = NULL;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment