Compare commits
2 Commits
ad2034b15d
...
c474aa4405
Author | SHA1 | Date |
---|---|---|
baz | c474aa4405 | |
baz | 3c69fc2289 |
|
@ -275,6 +275,13 @@ void ANakatomiCharacter::PlayOnFireAnimations()
|
|||
|
||||
void ANakatomiCharacter::OnDamaged()
|
||||
{
|
||||
int32 randomAnimMontage = FMath::RandRange(0,OnDamagedHitAnimMontages.Num()-1);
|
||||
|
||||
if (OnDamagedHitAnimMontages[randomAnimMontage] != nullptr)
|
||||
{
|
||||
//TODO: Disable movement while playing animation montage
|
||||
// PlayAnimMontage(OnDamagedHitAnimMontages[randomAnimMontage]);
|
||||
}
|
||||
}
|
||||
|
||||
void ANakatomiCharacter::OnDeath()
|
||||
|
|
|
@ -42,6 +42,9 @@ public:
|
|||
UPROPERTY(EditDefaultsOnly)
|
||||
UAnimMontage* FireWeaponAnimMontage;
|
||||
|
||||
UPROPERTY(EditDefaultsOnly)
|
||||
TArray<UAnimMontage*> OnDamagedHitAnimMontages;
|
||||
|
||||
protected:
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Meta = (AllowPrivateAccess = "true"))
|
||||
UNakatomiCMC* NakatomiCMC;
|
||||
|
|
|
@ -460,14 +460,6 @@ void APlayerCharacter::PlayOnFireAnimations()
|
|||
void APlayerCharacter::OnDamaged()
|
||||
{
|
||||
Super::OnDamaged();
|
||||
|
||||
int32 randomAnimMontage = FMath::RandRange(0,OnDamagedHitAnimMontages.Num()-1);
|
||||
|
||||
if (OnDamagedHitAnimMontages[randomAnimMontage] != nullptr)
|
||||
{
|
||||
//TODO: Disable movement while playing animation montage
|
||||
PlayAnimMontage(OnDamagedHitAnimMontages[randomAnimMontage]);
|
||||
}
|
||||
}
|
||||
|
||||
void APlayerCharacter::OnDeath()
|
||||
|
|
|
@ -88,9 +88,6 @@ public:
|
|||
|
||||
UPROPERTY(EditDefaultsOnly)
|
||||
UAnimMontage* ThrowExplosiveAnimMontage;
|
||||
|
||||
UPROPERTY(EditDefaultsOnly)
|
||||
TArray<UAnimMontage*> OnDamagedHitAnimMontages;
|
||||
|
||||
UPROPERTY(EditDefaultsOnly)
|
||||
UAnimMontage* FireWeaponADSAnimMontage;
|
||||
|
|
Loading…
Reference in New Issue