Merge branch 'master' of https://git.tlimon.fr/ICAN_4JV/LegumeMix
This commit is contained in:
commit
1682543893
4
.gitignore
vendored
4
.gitignore
vendored
@ -47,8 +47,8 @@ SourceArt/**/*.png
|
|||||||
SourceArt/**/*.tga
|
SourceArt/**/*.tga
|
||||||
|
|
||||||
# Binary Files
|
# Binary Files
|
||||||
#Binaries/*
|
Binaries/*
|
||||||
#Plugins/**/Binaries/*
|
Plugins/**/Binaries/*
|
||||||
|
|
||||||
# Builds
|
# Builds
|
||||||
Build/*
|
Build/*
|
||||||
|
BIN
Content/Legumix/Ennemy/BP_HealthComponent.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Ennemy/BP_HealthComponent.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Ennemy/MeleeEnemy/AI/BT_MeleeEnemy.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Ennemy/MeleeEnemy/AI/BT_MeleeEnemy.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Ennemy/MeleeEnemy/AI/Task/BTTask_FindPlayer.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Ennemy/MeleeEnemy/AI/Task/BTTask_FindPlayer.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Ennemy/RangeEnemy/AI/BB_RangeEnnemy.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Ennemy/RangeEnemy/AI/BB_RangeEnnemy.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Ennemy/RangeEnemy/AI/BT_RangeEnnemy.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Ennemy/RangeEnemy/AI/BT_RangeEnnemy.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Ennemy/RangeEnemy/AI/Task/BTTask_RangeAttack.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Ennemy/RangeEnemy/AI/Task/BTTask_RangeAttack.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Ennemy/RangeEnemy/BP_DistantEnemy.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Ennemy/RangeEnemy/BP_DistantEnemy.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Ennemy/RangeEnemy/Projectile/BP_Projectile.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Ennemy/RangeEnemy/Projectile/BP_Projectile.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Levels/LVL_GYM_00.umap
(Stored with Git LFS)
BIN
Content/Legumix/Levels/LVL_GYM_00.umap
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Player/BP_Play.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Player/BP_Play.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Weapon/Revolver/BP_Revolver.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Weapon/Revolver/BP_Revolver.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Weapon/Revolver/FireAnimationTest/AM_Arms_Fire.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Weapon/Revolver/FireAnimationTest/AM_Arms_Fire.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Weapon/Revolver/FireAnimationTest/AM_Revolver_Fire.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Weapon/Revolver/FireAnimationTest/AM_Revolver_Fire.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Weapon/Shotgun/Animations/ABP_Shotgun.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Weapon/Shotgun/Animations/ABP_Shotgun.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Weapon/Shotgun/Animations/AM_Arms_Fire.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Weapon/Shotgun/Animations/AM_Arms_Fire.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Weapon/Shotgun/Animations/AM_Shotgun_Fire.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Weapon/Shotgun/Animations/AM_Shotgun_Fire.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset
(Stored with Git LFS)
Binary file not shown.
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#include "LMWaveManager.h"
|
#include "LMWaveManager.h"
|
||||||
|
|
||||||
#include "IPropertyTable.h"
|
|
||||||
#include "Components/CapsuleComponent.h"
|
#include "Components/CapsuleComponent.h"
|
||||||
#include "Enemy/LMEnemy.h"
|
#include "Enemy/LMEnemy.h"
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ void ULMHealthComponent::Kill()
|
|||||||
void ULMHealthComponent::HitBoxHit(ULMHitBox* HitBox, const float Damage, const FVector& Origin, const FHitResult& HitInfo)
|
void ULMHealthComponent::HitBoxHit(ULMHitBox* HitBox, const float Damage, const FVector& Origin, const FHitResult& HitInfo)
|
||||||
{
|
{
|
||||||
TakeDamage(Damage);
|
TakeDamage(Damage);
|
||||||
OnHit(Damage, Origin, HitInfo);
|
OnHit.Broadcast(Damage, Origin, HitInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,11 +14,15 @@ ULMHitBox::ULMHitBox()
|
|||||||
|
|
||||||
void ULMHitBox::OnHit(const FLMBulletInfo& BulletInfo, const FHitResult& Hit)
|
void ULMHitBox::OnHit(const FLMBulletInfo& BulletInfo, const FHitResult& Hit)
|
||||||
{
|
{
|
||||||
const float Damage = BulletInfo.Damage;
|
|
||||||
const double Distance = FVector::Distance(BulletInfo.Origin, GetComponentLocation());
|
const double Distance = FVector::Distance(BulletInfo.Origin, GetComponentLocation());
|
||||||
|
|
||||||
const float TotalDamage = CalculateDamage(Damage, Distance, BulletInfo.Falloff, BulletInfo.MaxDistance);
|
const float TotalDamage = CalculateDamage(BulletInfo.Damage, Distance, BulletInfo.Falloff, BulletInfo.MaxDistance);
|
||||||
OnHitBoxHit.Broadcast(this, TotalDamage, BulletInfo.Origin, Hit);
|
OnHitSimple(TotalDamage, BulletInfo.Origin, Hit);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ULMHitBox::OnHitSimple(float const Damage, FVector const Origin, const FHitResult& Hit)
|
||||||
|
{
|
||||||
|
OnHitBoxHit.Broadcast(this, Damage, Origin, Hit);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ULMHitBox::CanBeHitByTeam(const ETeam Team) const
|
bool ULMHitBox::CanBeHitByTeam(const ETeam Team) const
|
||||||
|
@ -154,7 +154,6 @@ bool ULMMovementComponent::IsCustomMovementMode(ECustomMovementModes InCustomMov
|
|||||||
|
|
||||||
void ULMMovementComponent::EnterSlide()
|
void ULMMovementComponent::EnterSlide()
|
||||||
{
|
{
|
||||||
UE_LOG(LogTemp, Error, TEXT("Entering Slide"));
|
|
||||||
bWantsToCrouch = true;
|
bWantsToCrouch = true;
|
||||||
Velocity += Velocity.GetSafeNormal2D() * SlideEnterImpulse;
|
Velocity += Velocity.GetSafeNormal2D() * SlideEnterImpulse;
|
||||||
SetMovementMode(EMovementMode::MOVE_Custom, ECustomMovementModes::ECMM_Sliding);
|
SetMovementMode(EMovementMode::MOVE_Custom, ECustomMovementModes::ECMM_Sliding);
|
||||||
@ -162,7 +161,6 @@ void ULMMovementComponent::EnterSlide()
|
|||||||
|
|
||||||
void ULMMovementComponent::ExitSlide()
|
void ULMMovementComponent::ExitSlide()
|
||||||
{
|
{
|
||||||
UE_LOG(LogTemp, Error, TEXT("Exiting Slide"));
|
|
||||||
bWantsToCrouch = false;
|
bWantsToCrouch = false;
|
||||||
|
|
||||||
FQuat NewRotation = FRotationMatrix::MakeFromXZ(UpdatedComponent->GetForwardVector().GetSafeNormal2D(), FVector::UpVector).ToQuat();
|
FQuat NewRotation = FRotationMatrix::MakeFromXZ(UpdatedComponent->GetForwardVector().GetSafeNormal2D(), FVector::UpVector).ToQuat();
|
||||||
|
@ -30,7 +30,6 @@ void ALMRevolver::PrimaryFire()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PlayEvent(FireEvent);
|
|
||||||
PlayAnimation(PrimaryFireAnimation);
|
PlayAnimation(PrimaryFireAnimation);
|
||||||
Player->PlayAnimation(PrimaryFireArmsAnimation);
|
Player->PlayAnimation(PrimaryFireArmsAnimation);
|
||||||
|
|
||||||
|
@ -30,8 +30,8 @@ void ALMShotgun::PrimaryFire()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PlayEvent(FireEvent);
|
|
||||||
PlayAnimation(PrimaryFireAnimation);
|
PlayAnimation(PrimaryFireAnimation);
|
||||||
|
Player->PlayAnimation(PrimaryFireArmsAnimation);
|
||||||
|
|
||||||
const FVector Origin = Player->GetWeaponFiringOrigin();
|
const FVector Origin = Player->GetWeaponFiringOrigin();
|
||||||
const FVector Direction = Player->GetAimVector();
|
const FVector Direction = Player->GetAimVector();
|
||||||
|
@ -100,12 +100,13 @@ bool ALMWeaponBase::DefaultReload()
|
|||||||
if (ClipAmmo >= MaxClip)
|
if (ClipAmmo >= MaxClip)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// TODO: replace with anim notifies
|
||||||
PlayEvent(ReloadSound);
|
PlayEvent(ReloadSound);
|
||||||
PlayAnimation(ReloadAnimation);
|
PlayAnimation(ReloadAnimation);
|
||||||
|
Player->PlayAnimation(ReloadArmsAnimation);
|
||||||
|
|
||||||
State = EWeaponState::EWS_Reloading;
|
State = EWeaponState::EWS_Reloading;
|
||||||
|
|
||||||
// TODO: Use Animations
|
|
||||||
OnDefaultReload();
|
OnDefaultReload();
|
||||||
GetWorldTimerManager().SetTimer(ReloadTimer, this, &ALMWeaponBase::AllowRefire, ReloadDelay);
|
GetWorldTimerManager().SetTimer(ReloadTimer, this, &ALMWeaponBase::AllowRefire, ReloadDelay);
|
||||||
Player->OnReload();
|
Player->OnReload();
|
||||||
|
@ -17,6 +17,7 @@ class LEGUMEMIX_API ULMHealthComponent : public UActorComponent
|
|||||||
|
|
||||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnHealthChangedSignature, float, Health, float, Damage);
|
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnHealthChangedSignature, float, Health, float, Damage);
|
||||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnDeathSignature);
|
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnDeathSignature);
|
||||||
|
DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams(FOnHitSignature, float, Damage, const FVector&, Origin, const FHitResult&, HitInfo);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ULMHealthComponent();
|
ULMHealthComponent();
|
||||||
@ -78,8 +79,8 @@ public:
|
|||||||
* @param Origin The origin of the damage.
|
* @param Origin The origin of the damage.
|
||||||
* @param HitInfo The collisions informations.
|
* @param HitInfo The collisions informations.
|
||||||
*/
|
*/
|
||||||
UFUNCTION(BlueprintImplementableEvent, Category=Legumix, meta=(Keywords = "Refill"))
|
UPROPERTY(BlueprintCallable, BlueprintAssignable, Category=Legumix)
|
||||||
void OnHit(float Damage, const FVector& Origin, const FHitResult& HitInfo);
|
FOnHitSignature OnHit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Completely refill the health of the component.
|
* Completely refill the health of the component.
|
||||||
|
@ -20,7 +20,12 @@ class LEGUMEMIX_API ULMHitBox : public UCapsuleComponent
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
ULMHitBox();
|
ULMHitBox();
|
||||||
|
UFUNCTION(BlueprintCallable, Category=Legumix)
|
||||||
void OnHit(const FLMBulletInfo& BulletInfo, const FHitResult& Hit);
|
void OnHit(const FLMBulletInfo& BulletInfo, const FHitResult& Hit);
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable, Category=Legumix)
|
||||||
|
void OnHitSimple(float const Damage, FVector const Origin, const FHitResult& Hit);
|
||||||
|
|
||||||
void SetHealthComponent(ULMHealthComponent* NewHealthComponent) { HealthComponent = NewHealthComponent; }
|
void SetHealthComponent(ULMHealthComponent* NewHealthComponent) { HealthComponent = NewHealthComponent; }
|
||||||
bool CanBeHitByTeam(ETeam Team) const;
|
bool CanBeHitByTeam(ETeam Team) const;
|
||||||
|
|
||||||
|
@ -71,10 +71,6 @@ public:
|
|||||||
protected: /* Weapon Data */
|
protected: /* Weapon Data */
|
||||||
FTimerHandle FireTimer;
|
FTimerHandle FireTimer;
|
||||||
FTimerHandle ReloadTimer;
|
FTimerHandle ReloadTimer;
|
||||||
|
|
||||||
/** The sound to play when firing. */
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite,Category="Legumix|Sounds")
|
|
||||||
TObjectPtr<UFMODEvent> FireEvent;
|
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite,Category="Legumix|Sounds")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite,Category="Legumix|Sounds")
|
||||||
TObjectPtr<UFMODEvent> ReloadSound;
|
TObjectPtr<UFMODEvent> ReloadSound;
|
||||||
|
Reference in New Issue
Block a user