42 lines
1.0 KiB
C++
42 lines
1.0 KiB
C++
// 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<class ANetworkDoor*> 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;
|
|
};
|