Skip to content

Commit

Permalink
#77 Fire animation move to separated BP
Browse files Browse the repository at this point in the history
  • Loading branch information
xthebat committed Dec 18, 2023
1 parent 2bd9414 commit 8e993cc
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 33 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Content/Maps/warmup.umap
Binary file not shown.
3 changes: 3 additions & 0 deletions Docs/Unreal/CreateAnimBlueprintFunc.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Создание "функций" с параметрами в Animation Blueprint

[Видео на YouTube](https://www.youtube.com/watch?v=hpZEGFimGYA)
Binary file modified Importing/tm_jungle_raider_variantb2_fire.blend
Binary file not shown.
16 changes: 0 additions & 16 deletions Source/Cloud9/Character/Components/Cloud9Inventory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,19 +201,3 @@ ACloud9WeaponBase* UCloud9Inventory::GetSelectedWeapon() const { return GetWeapo
ACloud9WeaponBase* UCloud9Inventory::GetPendingWeapon() const { return GetWeaponAt(PendingWeaponSlot); }

bool UCloud9Inventory::IsWeaponChanging() const { return SelectedWeaponSlot != PendingWeaponSlot; }

EWeaponType UCloud9Inventory::GetSelectedWeaponType() const
{
let Weapon = GetWeaponAt(SelectedWeaponSlot);
return IsValid(Weapon) ? Weapon->GetWeaponType() : EWeaponType::NoWeapon;
}

EWeaponType UCloud9Inventory::GetPendingWeaponType() const
{
let Weapon = GetWeaponAt(PendingWeaponSlot);
return IsValid(Weapon) ? Weapon->GetWeaponType() : EWeaponType::NoWeapon;
}

EWeaponSlot UCloud9Inventory::GetSelectedWeaponSlot() const { return SelectedWeaponSlot; }

EWeaponSlot UCloud9Inventory::GetPendingWeaponSlot() const { return PendingWeaponSlot; }
21 changes: 4 additions & 17 deletions Source/Cloud9/Character/Components/Cloud9Inventory.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include "Cloud9/Weapon/Enums/FirearmNames.h"
#include "Cloud9/Weapon/Enums/MeleeNames.h"
#include "Cloud9/Weapon/Enums/WeaponSlot.h"
#include "Cloud9/Weapon/Enums/WeaponType.h"
#include "Cloud9Inventory.generated.h"

class ACloud9WeaponBase;
Expand All @@ -50,18 +49,6 @@ class CLOUD9_API UCloud9Inventory
UFUNCTION(BlueprintCallable)
bool SelectWeapon(EWeaponSlot Slot);

UFUNCTION(BlueprintCallable)
EWeaponType GetSelectedWeaponType() const;

UFUNCTION(BlueprintCallable)
EWeaponType GetPendingWeaponType() const;

UFUNCTION(BlueprintCallable)
EWeaponSlot GetSelectedWeaponSlot() const;

UFUNCTION(BlueprintCallable)
EWeaponSlot GetPendingWeaponSlot() const;

UFUNCTION(BlueprintCallable)
ACloud9WeaponBase* GetWeaponAt(EWeaponSlot Slot) const;

Expand Down Expand Up @@ -107,15 +94,15 @@ class CLOUD9_API UCloud9Inventory
UPROPERTY()
TArray<ACloud9WeaponBase*> WeaponSlots;

UPROPERTY(Category=Weapon, BlueprintReadOnly, meta=(AllowPrivateAccess))
UPROPERTY(Category=Weapon, BlueprintReadOnly)
EWeaponSlot SelectedWeaponSlot;

UPROPERTY(Category=Weapon, BlueprintReadOnly, meta=(AllowPrivateAccess))
UPROPERTY(Category=Weapon, BlueprintReadOnly)
EWeaponSlot PendingWeaponSlot;

UPROPERTY(Category=Weapon, EditDefaultsOnly, meta=(AllowPrivateAccess))
UPROPERTY(Category=Weapon, EditDefaultsOnly)
EMelee DefaultKnifeName;

UPROPERTY(Category=Weapon, EditDefaultsOnly, meta=(AllowPrivateAccess))
UPROPERTY(Category=Weapon, EditDefaultsOnly)
EFirearm DefaultPistolName;
};

0 comments on commit 8e993cc

Please sign in to comment.