Fix damage flash implementation
This commit is contained in:
@@ -176,6 +176,14 @@ protected:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Effects")
|
||||
FLinearColor DamageFlashColor = FLinearColor(1.0f, 0.0f, 0.0f, 0.5f);
|
||||
|
||||
// Store the original material
|
||||
UPROPERTY()
|
||||
UMaterialInterface* OriginalMaterial;
|
||||
|
||||
// Store the dynamic material instance
|
||||
UPROPERTY()
|
||||
UMaterialInstanceDynamic* DynamicMaterialInstance;
|
||||
|
||||
private:
|
||||
// Movement state
|
||||
float CurrentThrottleInput;
|
||||
@@ -213,6 +221,9 @@ private:
|
||||
FTimerHandle DamageFlashTimerHandle;
|
||||
float LastDamageTime;
|
||||
|
||||
// Initialize dynamic material
|
||||
void InitializeDynamicMaterial();
|
||||
|
||||
void StartShieldRecharge();
|
||||
void RechargeShield();
|
||||
bool IsDead() const { return CurrentHealth <= 0.0f; }
|
||||
|
||||
Reference in New Issue
Block a user