bruh moment?

This commit is contained in:
Ji Yoon Rhee
2024-02-25 17:46:42 -05:00
parent 2c8481bd61
commit 0e4fd6a175
76 changed files with 5999 additions and 2199 deletions

View File

@ -1,10 +1,10 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "HYHitscanComponent.h"
#include "HYAttackComponent.h"
// Sets default values for this component's properties
UHYHitscanComponent::UHYHitscanComponent()
UHYAttackComponent::UHYAttackComponent()
{
// Set this component to be initialized when the game starts, and to be ticked every frame. You can turn these features
// off to improve performance if you don't need them.
@ -15,7 +15,7 @@ UHYHitscanComponent::UHYHitscanComponent()
// Called when the game starts
void UHYHitscanComponent::BeginPlay()
void UHYAttackComponent::BeginPlay()
{
Super::BeginPlay();
@ -25,7 +25,7 @@ void UHYHitscanComponent::BeginPlay()
// Called every frame
void UHYHitscanComponent::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
void UHYAttackComponent::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
{
Super::TickComponent(DeltaTime, TickType, ThisTickFunction);

View File

@ -0,0 +1,47 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "HYAttackComponent.generated.h"
// collision-based attack part
USTRUCT(BlueprintType)
struct FMeleeAttackPart {
GENERATED_USTRUCT_BODY()
//collider component (box collider)
//attributes (floats):
// base attack damage number
// critical attack damage number
// critical attack rate percentage
//hitbox related info:
// position of the hitbox relative to the player
// 3D vector of the dimensions of the hitbox
// 1 giant hit box (TODO: figure out a way to consider multiple parts as one hitbox entity to avoid looping)
//method that returns boolean value based on whether there has been a collision detected with the enemy
};
UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class HWANYOUNG2_API UHYAttackComponent : public UActorComponent
{
GENERATED_BODY()
public:
// Sets default values for this component's properties
UHYAttackComponent();
protected:
// Called when the game starts
virtual void BeginPlay() override;
public:
// Called every frame
virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
//method that takes care of the dealing damage
};

View File

@ -1,28 +0,0 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "HYHitscanComponent.generated.h"
UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class HWANYOUNG2_API UHYHitscanComponent : public UActorComponent
{
GENERATED_BODY()
public:
// Sets default values for this component's properties
UHYHitscanComponent();
protected:
// Called when the game starts
virtual void BeginPlay() override;
public:
// Called every frame
virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
};

View File

@ -0,0 +1,34 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "HYProjectileAttackComponent.h"
// Sets default values for this component's properties
UHYProjectileAttackComponent::UHYProjectileAttackComponent()
{
// Set this component to be initialized when the game starts, and to be ticked every frame. You can turn these features
// off to improve performance if you don't need them.
PrimaryComponentTick.bCanEverTick = true;
// ...
}
// Called when the game starts
void UHYProjectileAttackComponent::BeginPlay()
{
Super::BeginPlay();
// ...
}
// Called every frame
void UHYProjectileAttackComponent::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
{
Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
// ...
}

View File

@ -0,0 +1,50 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "HYProjectileAttackComponent.generated.h"
// hitscan-based attack part
USTRUCT(BlueprintType)
struct FProjectileAttackPart {
GENERATED_USTRUCT_BODY()
//line trace component
//attributes (floats):
// base attack damage number
// critical attack damage number
// critical attack rate percentage
//line trace related info:
// where is the source of line trace placed?
// origin of the raycast
//method that returns boolean value based on whether the line trace has hit the enemy
};
UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class HWANYOUNG2_API UHYProjectileAttackComponent : public UActorComponent
{
GENERATED_BODY()
public:
// Sets default values for this component's properties
UHYProjectileAttackComponent();
protected:
// Called when the game starts
virtual void BeginPlay() override;
public:
// Called every frame
virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
//method that takes care of the dealing damage
};

View File

@ -5,7 +5,6 @@
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "HYEnemy.h"
#include "HYHitscanComponent.h"
#include "HYWeapon.generated.h"
UCLASS()
@ -25,8 +24,7 @@ public:
float critRate; //percentage rate of how likely one hits a crit dmg
//here, we also want to add a custom component object that takes care of the hitscan/collision related things
class UHYHitscanComponent* hitScanComponent;
/* smth to think about in later epics:
* hit stop - this is more an event+animation frame related thing