-
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
73 changed files
with
275 additions
and
286 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+101 KB
Content/Characters/Common/Sequences/Death/a_death_pose_body_crouch_E.uasset
Binary file not shown.
Binary file added
BIN
+101 KB
Content/Characters/Common/Sequences/Death/a_death_pose_body_crouch_N.uasset
Binary file not shown.
Binary file added
BIN
+102 KB
Content/Characters/Common/Sequences/Death/a_death_pose_body_crouch_NE.uasset
Binary file not shown.
Binary file added
BIN
+100 KB
Content/Characters/Common/Sequences/Death/a_death_pose_body_crouch_NW.uasset
Binary file not shown.
Binary file added
BIN
+102 KB
Content/Characters/Common/Sequences/Death/a_death_pose_body_crouch_S.uasset
Binary file not shown.
Binary file added
BIN
+101 KB
Content/Characters/Common/Sequences/Death/a_death_pose_body_crouch_SE.uasset
Binary file not shown.
Binary file added
BIN
+102 KB
Content/Characters/Common/Sequences/Death/a_death_pose_body_crouch_SW.uasset
Binary file not shown.
Binary file added
BIN
+101 KB
Content/Characters/Common/Sequences/Death/a_death_pose_body_crouch_W.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+101 KB
Content/Characters/Common/Sequences/Death/a_death_pose_head_crouch_E.uasset
Binary file not shown.
Binary file added
BIN
+100 KB
Content/Characters/Common/Sequences/Death/a_death_pose_head_crouch_N.uasset
Binary file not shown.
Binary file added
BIN
+100 KB
Content/Characters/Common/Sequences/Death/a_death_pose_head_crouch_NE.uasset
Binary file not shown.
Binary file added
BIN
+99.7 KB
Content/Characters/Common/Sequences/Death/a_death_pose_head_crouch_NW.uasset
Binary file not shown.
Binary file added
BIN
+101 KB
Content/Characters/Common/Sequences/Death/a_death_pose_head_crouch_S.uasset
Binary file not shown.
Binary file added
BIN
+101 KB
Content/Characters/Common/Sequences/Death/a_death_pose_head_crouch_SE.uasset
Binary file not shown.
Binary file added
BIN
+102 KB
Content/Characters/Common/Sequences/Death/a_death_pose_head_crouch_SW.uasset
Binary file not shown.
Binary file added
BIN
+101 KB
Content/Characters/Common/Sequences/Death/a_death_pose_head_crouch_W.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
69 changes: 69 additions & 0 deletions
69
Source/Cloud9/Character/Components/Cloud9AnimationComponent.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,69 @@ | ||
// Copyright (c) 2024 Alexei Gladkikh | ||
|
||
#include "Cloud9AnimationComponent.h" | ||
|
||
#include "Cloud9/Tools/Macro/Common.h" | ||
#include "Cloud9/Tools/Macro/Logging.h" | ||
|
||
#include "Cloud9/Character/Cloud9Character.h" | ||
|
||
UCloud9AnimationComponent::UCloud9AnimationComponent() {} | ||
|
||
UAnimInstance* UCloud9AnimationComponent::GetAnimInstance() const | ||
{ | ||
let Character = GetOwner<ACloud9Character>(); | ||
|
||
if (not IsValid(Character)) | ||
{ | ||
log(Error, "[Component='%s'] Character is invalid", *GetName()); | ||
return nullptr; | ||
} | ||
|
||
let Mesh = Character->GetMesh(); | ||
|
||
if (not IsValid(Mesh)) | ||
{ | ||
log(Error, "[Component='%s'] Mesh is invalid", *GetName()); | ||
return nullptr; | ||
} | ||
|
||
return Mesh->GetAnimInstance(); | ||
} | ||
|
||
bool UCloud9AnimationComponent::PlayMontage(UAnimMontage* Montage, float StartTime, float Rate) const | ||
{ | ||
if (not IsValid(Montage)) | ||
{ | ||
log(Error, "[Component='%s'] Montage is invalid", *GetName()); | ||
return false; | ||
} | ||
|
||
let AnimInstance = GetAnimInstance(); | ||
|
||
if (not IsValid(AnimInstance)) | ||
{ | ||
log(Error, "[Component='%s'] AnimInstance is invalid for montage '%s'", *GetName(), *Montage->GetName()); | ||
return false; | ||
} | ||
|
||
if (not AnimInstance->Montage_Play(Montage, Rate, EMontagePlayReturnType::MontageLength, StartTime)) | ||
{ | ||
log(Error, "[Component='%s'] Can't play montage '%s'", *GetName(), *Montage->GetName()); | ||
return false; | ||
} | ||
|
||
return true; | ||
} | ||
|
||
bool UCloud9AnimationComponent::IsAnyMontagePlaying() const | ||
{ | ||
let AnimInstance = GetAnimInstance(); | ||
|
||
if (not IsValid(AnimInstance)) | ||
{ | ||
log(Error, "[Component='%s'] AnimInstance is invalid", *GetName()); | ||
return false; | ||
} | ||
|
||
return AnimInstance->IsAnyMontagePlaying(); | ||
} |
24 changes: 24 additions & 0 deletions
24
Source/Cloud9/Character/Components/Cloud9AnimationComponent.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,24 @@ | ||
// Copyright (c) 2024 Alexei Gladkikh | ||
|
||
#pragma once | ||
|
||
#include "CoreMinimal.h" | ||
#include "Components/ActorComponent.h" | ||
#include "Cloud9AnimationComponent.generated.h" | ||
|
||
class ACloud9Character; | ||
|
||
UCLASS(Blueprintable) | ||
class CLOUD9_API UCloud9AnimationComponent : public UActorComponent | ||
{ | ||
GENERATED_BODY() | ||
|
||
public: | ||
UCloud9AnimationComponent(); | ||
|
||
UAnimInstance* GetAnimInstance() const; | ||
|
||
bool PlayMontage(UAnimMontage* Montage, float StartTime = 0.0f, float Rate = 1.0f) const; | ||
|
||
bool IsAnyMontagePlaying() const; | ||
}; |
48 changes: 0 additions & 48 deletions
48
Source/Cloud9/Character/Components/Cloud9CharacterComponent.cpp
This file was deleted.
Oops, something went wrong.
48 changes: 0 additions & 48 deletions
48
Source/Cloud9/Character/Components/Cloud9CharacterComponent.h
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.