-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
191 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
Source/Cloud9/Character/Effects/Cloud9CharacterEffectInterface.cpp
This file was deleted.
Oops, something went wrong.
45 changes: 0 additions & 45 deletions
45
Source/Cloud9/Character/Effects/Cloud9CharacterEffectInterface.h
This file was deleted.
Oops, something went wrong.
44 changes: 44 additions & 0 deletions
44
Source/Cloud9/Character/Effects/Cloud9CharacterEffectTrait.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyright (c) 2024 Alexei Gladkikh | ||
|
||
#include "Cloud9CharacterEffectTrait.h" | ||
|
||
#include "Cloud9/Tools/Macro/Common.h" | ||
#include "Cloud9/Tools/Macro/Logging.h" | ||
|
||
#include "Cloud9/Character/Components/Cloud9EffectsComponent.h" | ||
|
||
bool UCloud9CharacterEffectTrait::IsExtinguished_Implementation() const { return true; } | ||
|
||
void UCloud9CharacterEffectTrait::OnApply_Implementation() {} | ||
|
||
void UCloud9CharacterEffectTrait::OnRemove_Implementation() {} | ||
|
||
bool UCloud9CharacterEffectTrait::CanApply_Implementation() const { return true; } | ||
|
||
bool UCloud9CharacterEffectTrait::CanTick_Implementation() const { return false; } | ||
|
||
bool UCloud9CharacterEffectTrait::CanDamaged_Implementation() const { return false; } | ||
|
||
void UCloud9CharacterEffectTrait::OnTick_Implementation(float DeltaSeconds) {} | ||
|
||
void UCloud9CharacterEffectTrait::OnApplyDamage_Implementation(float Damage) {} | ||
|
||
const UCloud9EffectsComponent* UCloud9CharacterEffectTrait::GetContainer() const | ||
{ | ||
let MyOuter = GetOuter(); | ||
|
||
if (not IsValid(MyOuter)) | ||
{ | ||
log(Fatal, "Effect outer parent object wasn't specified"); | ||
return nullptr; | ||
} | ||
|
||
let Container = Cast<UCloud9EffectsComponent>(MyOuter); | ||
if (not IsValid(Container)) | ||
{ | ||
log(Fatal, "Effect outer parent object is invalid"); | ||
return nullptr; | ||
} | ||
|
||
return Container; | ||
} |
60 changes: 60 additions & 0 deletions
60
Source/Cloud9/Character/Effects/Cloud9CharacterEffectTrait.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// Copyright (c) 2024 Alexei Gladkikh | ||
|
||
#pragma once | ||
|
||
#include "CoreMinimal.h" | ||
#include "UObject/Object.h" | ||
|
||
#include "Cloud9CharacterEffectTrait.generated.h" | ||
|
||
class UCloud9EffectsComponent; | ||
|
||
UCLASS() | ||
class CLOUD9_API UCloud9CharacterEffectTrait : public UObject | ||
{ | ||
GENERATED_BODY() | ||
|
||
public: | ||
UFUNCTION(BlueprintCallable, BlueprintNativeEvent) | ||
bool IsExtinguished() const; | ||
|
||
UFUNCTION(BlueprintCallable, BlueprintNativeEvent) | ||
void OnApply(); | ||
|
||
UFUNCTION(BlueprintCallable, BlueprintNativeEvent) | ||
void OnRemove(); | ||
|
||
UFUNCTION(BlueprintCallable, BlueprintNativeEvent) | ||
bool CanApply() const; | ||
|
||
UFUNCTION(BlueprintCallable, BlueprintNativeEvent) | ||
bool CanTick() const; | ||
|
||
UFUNCTION(BlueprintCallable, BlueprintNativeEvent) | ||
bool CanDamaged() const; | ||
|
||
UFUNCTION(BlueprintCallable, BlueprintNativeEvent) | ||
void OnTick(float DeltaSeconds); | ||
|
||
UFUNCTION(BlueprintCallable, BlueprintNativeEvent) | ||
void OnApplyDamage(float Damage); | ||
|
||
virtual bool IsExtinguished_Implementation() const; | ||
|
||
virtual void OnApply_Implementation(); | ||
|
||
virtual void OnRemove_Implementation(); | ||
|
||
virtual bool CanApply_Implementation() const; | ||
|
||
virtual bool CanTick_Implementation() const; | ||
|
||
virtual bool CanDamaged_Implementation() const; | ||
|
||
virtual void OnTick_Implementation(float DeltaSeconds); | ||
|
||
virtual void OnApplyDamage_Implementation(float Damage); | ||
|
||
protected: | ||
const UCloud9EffectsComponent* GetContainer() const; | ||
}; |
Oops, something went wrong.