// Project Lab - NHTV Igad #pragma once #include "NetworkDoodad.h" #include "NetworkSwitch.generated.h" UCLASS() class UNREALPROJECT_API ANetworkSwitch : public ANetworkDoodad { GENERATED_BODY() public: ANetworkSwitch(); virtual void BeginPlay() override; virtual void Tick(float DeltaSeconds) override; void Toggle(); UPROPERTY(EditAnywhere, Category = "Switch Components") TArray doorsToOpen; UPROPERTY(EditAnywhere, Category = "Switch Components") float cooldown; UPROPERTY(EditAnywhere, Category = "Switch Components") bool toggles; UPROPERTY(Replicated, EditAnywhere, Category = "Switch Components") bool isSwitchClosed; private: float m_elapsedTime; UPROPERTY(EditAnywhere, Category = "Switch Components") class UBoxComponent* cubeCollider; UPROPERTY(EditAnywhere, Category = "Switch Components") class UStaticMeshComponent* meshComponent; UPROPERTY(EditAnywhere, Category = "Switch Components") class UNetworkSwitchComponent* visualizerComponent; };