Attempt to implement damage flash for enemy ships
This commit is contained in:
@@ -109,6 +109,20 @@ protected:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AI")
|
||||
float FlankingFrequency = 0.6f; // Increased chance of flanking (was 0.4f)
|
||||
|
||||
UPROPERTY()
|
||||
UMaterialInterface* OriginalMaterial;
|
||||
|
||||
UPROPERTY()
|
||||
UMaterialInstanceDynamic* DynamicMaterialInstance;
|
||||
|
||||
UPROPERTY(EditAnywhere, Category = "Effects")
|
||||
FLinearColor DamageFlashColor = FLinearColor(1.0f, 0.0f, 0.0f, 1.0f);
|
||||
|
||||
UPROPERTY(EditAnywhere, Category = "Effects")
|
||||
float DamageFlashDuration = 0.1f;
|
||||
|
||||
FTimerHandle DamageFlashTimerHandle;
|
||||
|
||||
public:
|
||||
virtual void Tick(float DeltaTime) override;
|
||||
|
||||
@@ -164,4 +178,8 @@ private:
|
||||
float LastFlankUpdateTime;
|
||||
FVector CurrentFlankTarget;
|
||||
bool bInitializedFlank;
|
||||
|
||||
void InitializeDynamicMaterial();
|
||||
void ApplyDamageFlash();
|
||||
void ResetDamageFlash();
|
||||
};
|
||||
Reference in New Issue
Block a user