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
|
||||
|
||||
# Binary Files
|
||||
#Binaries/*
|
||||
#Plugins/**/Binaries/*
|
||||
Binaries/*
|
||||
Plugins/**/Binaries/*
|
||||
|
||||
# Builds
|
||||
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 "IPropertyTable.h"
|
||||
#include "Components/CapsuleComponent.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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
const float Damage = BulletInfo.Damage;
|
||||
const double Distance = FVector::Distance(BulletInfo.Origin, GetComponentLocation());
|
||||
|
||||
const float TotalDamage = CalculateDamage(Damage, Distance, BulletInfo.Falloff, BulletInfo.MaxDistance);
|
||||
OnHitBoxHit.Broadcast(this, TotalDamage, BulletInfo.Origin, Hit);
|
||||
const float TotalDamage = CalculateDamage(BulletInfo.Damage, Distance, BulletInfo.Falloff, BulletInfo.MaxDistance);
|
||||
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
|
||||
|
@ -154,7 +154,6 @@ bool ULMMovementComponent::IsCustomMovementMode(ECustomMovementModes InCustomMov
|
||||
|
||||
void ULMMovementComponent::EnterSlide()
|
||||
{
|
||||
UE_LOG(LogTemp, Error, TEXT("Entering Slide"));
|
||||
bWantsToCrouch = true;
|
||||
Velocity += Velocity.GetSafeNormal2D() * SlideEnterImpulse;
|
||||
SetMovementMode(EMovementMode::MOVE_Custom, ECustomMovementModes::ECMM_Sliding);
|
||||
@ -162,7 +161,6 @@ void ULMMovementComponent::EnterSlide()
|
||||
|
||||
void ULMMovementComponent::ExitSlide()
|
||||
{
|
||||
UE_LOG(LogTemp, Error, TEXT("Exiting Slide"));
|
||||
bWantsToCrouch = false;
|
||||
|
||||
FQuat NewRotation = FRotationMatrix::MakeFromXZ(UpdatedComponent->GetForwardVector().GetSafeNormal2D(), FVector::UpVector).ToQuat();
|
||||
|
@ -30,7 +30,6 @@ void ALMRevolver::PrimaryFire()
|
||||
return;
|
||||
}
|
||||
|
||||
PlayEvent(FireEvent);
|
||||
PlayAnimation(PrimaryFireAnimation);
|
||||
Player->PlayAnimation(PrimaryFireArmsAnimation);
|
||||
|
||||
|
@ -30,8 +30,8 @@ void ALMShotgun::PrimaryFire()
|
||||
return;
|
||||
}
|
||||
|
||||
PlayEvent(FireEvent);
|
||||
PlayAnimation(PrimaryFireAnimation);
|
||||
Player->PlayAnimation(PrimaryFireArmsAnimation);
|
||||
|
||||
const FVector Origin = Player->GetWeaponFiringOrigin();
|
||||
const FVector Direction = Player->GetAimVector();
|
||||
|
@ -100,12 +100,13 @@ bool ALMWeaponBase::DefaultReload()
|
||||
if (ClipAmmo >= MaxClip)
|
||||
return false;
|
||||
|
||||
// TODO: replace with anim notifies
|
||||
PlayEvent(ReloadSound);
|
||||
PlayAnimation(ReloadAnimation);
|
||||
Player->PlayAnimation(ReloadArmsAnimation);
|
||||
|
||||
State = EWeaponState::EWS_Reloading;
|
||||
|
||||
// TODO: Use Animations
|
||||
OnDefaultReload();
|
||||
GetWorldTimerManager().SetTimer(ReloadTimer, this, &ALMWeaponBase::AllowRefire, ReloadDelay);
|
||||
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(FOnDeathSignature);
|
||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams(FOnHitSignature, float, Damage, const FVector&, Origin, const FHitResult&, HitInfo);
|
||||
|
||||
public:
|
||||
ULMHealthComponent();
|
||||
@ -78,8 +79,8 @@ public:
|
||||
* @param Origin The origin of the damage.
|
||||
* @param HitInfo The collisions informations.
|
||||
*/
|
||||
UFUNCTION(BlueprintImplementableEvent, Category=Legumix, meta=(Keywords = "Refill"))
|
||||
void OnHit(float Damage, const FVector& Origin, const FHitResult& HitInfo);
|
||||
UPROPERTY(BlueprintCallable, BlueprintAssignable, Category=Legumix)
|
||||
FOnHitSignature OnHit;
|
||||
|
||||
/**
|
||||
* Completely refill the health of the component.
|
||||
|
@ -20,7 +20,12 @@ class LEGUMEMIX_API ULMHitBox : public UCapsuleComponent
|
||||
|
||||
public:
|
||||
ULMHitBox();
|
||||
UFUNCTION(BlueprintCallable, Category=Legumix)
|
||||
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; }
|
||||
bool CanBeHitByTeam(ETeam Team) const;
|
||||
|
||||
|
@ -71,10 +71,6 @@ public:
|
||||
protected: /* Weapon Data */
|
||||
FTimerHandle FireTimer;
|
||||
FTimerHandle ReloadTimer;
|
||||
|
||||
/** The sound to play when firing. */
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite,Category="Legumix|Sounds")
|
||||
TObjectPtr<UFMODEvent> FireEvent;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite,Category="Legumix|Sounds")
|
||||
TObjectPtr<UFMODEvent> ReloadSound;
|
||||
|
Reference in New Issue
Block a user