blaster/Source/Blaster/Components/LagCompensationComponent.h

59 lines
1.0 KiB
C
Raw Normal View History

2022-05-26 15:32:23 +00:00
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
2022-05-27 09:06:39 +00:00
#include "Blaster/Character/BlasterCharacter.h"
2022-05-26 15:32:23 +00:00
#include "Components/ActorComponent.h"
#include "LagCompensationComponent.generated.h"
2022-05-27 09:06:39 +00:00
USTRUCT(BlueprintType)
struct FBoxInformation
{
GENERATED_BODY()
UPROPERTY()
FVector Location;
UPROPERTY()
FRotator Rotation;
UPROPERTY()
FVector BoxExtend;
};
USTRUCT(BlueprintType)
struct FFramePackage
{
GENERATED_BODY()
UPROPERTY()
float Time;
TMap<FName, FBoxInformation> HitBoxInfo;
};
2022-05-26 15:32:23 +00:00
UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class BLASTER_API ULagCompensationComponent : public UActorComponent
{
GENERATED_BODY()
public:
ULagCompensationComponent();
2022-05-27 09:06:39 +00:00
friend ABlasterCharacter;
2022-05-26 15:32:23 +00:00
virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
protected:
virtual void BeginPlay() override;
2022-05-27 09:06:39 +00:00
private:
UPROPERTY()
ABlasterCharacter* Character;
2022-05-26 15:32:23 +00:00
2022-05-27 09:06:39 +00:00
UPROPERTY()
ABlasterPlayerController* Controller;
2022-05-26 15:32:23 +00:00
};