更新 Source/FLESHEditor/Public/DismembermentGraph/DismembermentCompiler.h

This commit is contained in:
2025-04-21 18:24:33 +08:00
parent a0be0b6c8c
commit 4abd2157a9

View File

@@ -56,7 +56,7 @@ struct FDismembermentNodeData
TMap<FName, FName> NameParameters; TMap<FName, FName> NameParameters;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Dismemberment") UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Dismemberment")
TMap<FName, UObject*> ObjectParameters; TMap<FName, TObjectPtr<UObject>> ObjectParameters;
// Constructor // Constructor
FDismembermentNodeData() FDismembermentNodeData()
@@ -115,9 +115,9 @@ struct FDismembermentNodeData
} }
// Get object parameter // Get object parameter
UObject* GetObjectParameter(const FName& ParamName, UObject* DefaultValue = nullptr) const TObjectPtr<UObject> GetObjectParameter(const FName& ParamName, TObjectPtr<UObject> DefaultValue = nullptr) const
{ {
if (UObject* const* Value = ObjectParameters.Find(ParamName)) if (const TObjectPtr<UObject>* Value = ObjectParameters.Find(ParamName))
{ {
return *Value; return *Value;
} }
@@ -220,7 +220,7 @@ public:
* @param Depth - Depth of the cut * @param Depth - Depth of the cut
* @param Material - Material to use for the cut surface * @param Material - Material to use for the cut surface
*/ */
void AddCutOperation(const FVector& Location, const FVector& Direction, float Width, float Depth, UMaterialInterface* Material); void AddCutOperation(const FVector& Location, const FVector& Direction, float Width, float Depth, TObjectPtr<UMaterialInterface> Material);
/** /**
* Add a blood effect * Add a blood effect
@@ -232,7 +232,7 @@ public:
* @param BloodPoolSize - Size of the blood pool * @param BloodPoolSize - Size of the blood pool
* @param BloodPoolMaterial - Material for the blood pool * @param BloodPoolMaterial - Material for the blood pool
*/ */
void AddBloodEffect(const FVector& Location, UNiagaraSystem* BloodEffect, float BloodAmount, float BloodPressure, bool CreateBloodPool, float BloodPoolSize, UMaterialInterface* BloodPoolMaterial); void AddBloodEffect(const FVector& Location, TObjectPtr<UNiagaraSystem> BloodEffect, float BloodAmount, float BloodPressure, bool CreateBloodPool, float BloodPoolSize, TObjectPtr<UMaterialInterface> BloodPoolMaterial);
/** /**
* Add a physics simulation * Add a physics simulation
@@ -246,7 +246,7 @@ public:
* @param ImpulseForce - Force of the impulse * @param ImpulseForce - Force of the impulse
* @param ImpulseRadius - Radius of the impulse * @param ImpulseRadius - Radius of the impulse
*/ */
void AddPhysicsSimulation(float Mass, float LinearDamping, float AngularDamping, bool EnableGravity, bool SimulatePhysics, bool GenerateOverlapEvents, UPhysicalMaterial* PhysicalMaterial, float ImpulseForce, float ImpulseRadius); void AddPhysicsSimulation(float Mass, float LinearDamping, float AngularDamping, bool EnableGravity, bool SimulatePhysics, bool GenerateOverlapEvents, TObjectPtr<UPhysicalMaterial> PhysicalMaterial, float ImpulseForce, float ImpulseRadius);
/** /**
* Add an organ * Add an organ
@@ -261,7 +261,7 @@ public:
* @param IsCriticalOrgan - Whether this is a critical organ * @param IsCriticalOrgan - Whether this is a critical organ
* @param BloodAmount - Amount of blood * @param BloodAmount - Amount of blood
*/ */
void AddOrgan(UStaticMesh* OrganMesh, UMaterialInterface* OrganMaterial, const FName& AttachBoneName, const FVector& RelativeLocation, const FRotator& RelativeRotation, const FVector& RelativeScale, bool SimulatePhysics, float DamageMultiplier, bool IsCriticalOrgan, float BloodAmount); void AddOrgan(TObjectPtr<UStaticMesh> OrganMesh, TObjectPtr<UMaterialInterface> OrganMaterial, const FName& AttachBoneName, const FVector& RelativeLocation, const FRotator& RelativeRotation, const FVector& RelativeScale, bool SimulatePhysics, float DamageMultiplier, bool IsCriticalOrgan, float BloodAmount);
/** /**
* Add a wound effect * Add a wound effect
@@ -276,7 +276,7 @@ public:
* @param AffectBoneHealth - Whether to affect bone health * @param AffectBoneHealth - Whether to affect bone health
* @param BoneDamage - Amount of bone damage * @param BoneDamage - Amount of bone damage
*/ */
void AddWoundEffect(float WoundSize, float WoundDepth, UMaterialInterface* WoundMaterial, UNiagaraSystem* WoundEffect, bool CreateDecal, UMaterialInterface* DecalMaterial, float DecalSize, float DecalLifetime, bool AffectBoneHealth, float BoneDamage); void AddWoundEffect(float WoundSize, float WoundDepth, TObjectPtr<UMaterialInterface> WoundMaterial, TObjectPtr<UNiagaraSystem> WoundEffect, bool CreateDecal, TObjectPtr<UMaterialInterface> DecalMaterial, float DecalSize, float DecalLifetime, bool AffectBoneHealth, float BoneDamage);
private: private:
// The graph being compiled // The graph being compiled