Compare commits
	
		
			No commits in common. "fcb32e5679d8838d557340c8bc85fbcd8a04628c" and "d96a5c837a949262f839f36b331a6023a10b3616" have entirely different histories.
		
	
	
		
			fcb32e5679
			...
			d96a5c837a
		
	
		
							
								
								
									
										
											BIN
										
									
								
								Content/AnimStarterPack/Throw_Explosive_Montage.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Content/AnimStarterPack/Throw_Explosive_Montage.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Content/AnimStarterPack/Throw_Montage.uasset
									 (Stored with Git LFS)
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Content/AnimStarterPack/Throw_Montage.uasset
									 (Stored with Git LFS)
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Content/AnimStarterPack/Throw_Weapon_Montage.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Content/AnimStarterPack/Throw_Weapon_Montage.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Content/Player/PlayerCharacter.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Content/Player/PlayerCharacter.uasset
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							@ -1,15 +0,0 @@
 | 
				
			|||||||
// Fill out your copyright notice in the Description page of Project Settings.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include "../AnimNotify/NakatomiThrowExplosiveNotify.h"
 | 
					 | 
				
			||||||
#include "Nakatomi/PlayerCharacter.h"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void UNakatomiThrowExplosiveNotify::Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	APlayerCharacter* Character = Cast<APlayerCharacter>(MeshComp->GetOwner());
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (Character != nullptr)
 | 
					 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
		Character->ThrowExplosive();
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1,21 +0,0 @@
 | 
				
			|||||||
// Fill out your copyright notice in the Description page of Project Settings.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#pragma once
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include "CoreMinimal.h"
 | 
					 | 
				
			||||||
#include "Animation/AnimNotifies/AnimNotify.h"
 | 
					 | 
				
			||||||
#include "NakatomiThrowExplosiveNotify.generated.h"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					 | 
				
			||||||
 * 
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
UCLASS()
 | 
					 | 
				
			||||||
class NAKATOMI_API UNakatomiThrowExplosiveNotify : public UAnimNotify
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	GENERATED_BODY()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
public:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	virtual void Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation) override;
 | 
					 | 
				
			||||||
	
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
@ -1,16 +0,0 @@
 | 
				
			|||||||
// Fill out your copyright notice in the Description page of Project Settings.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include "../AnimNotify/NakatomiThrowWeaponNotify.h"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include "Nakatomi/PlayerCharacter.h"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void UNakatomiThrowWeaponNotify::Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	APlayerCharacter* Character = Cast<APlayerCharacter>(MeshComp->GetOwner());
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (Character != nullptr)
 | 
					 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
		Character->ThrowWeapon();
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1,20 +0,0 @@
 | 
				
			|||||||
// Fill out your copyright notice in the Description page of Project Settings.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#pragma once
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include "CoreMinimal.h"
 | 
					 | 
				
			||||||
#include "Animation/AnimNotifies/AnimNotify.h"
 | 
					 | 
				
			||||||
#include "NakatomiThrowWeaponNotify.generated.h"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					 | 
				
			||||||
 * 
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
UCLASS()
 | 
					 | 
				
			||||||
class NAKATOMI_API UNakatomiThrowWeaponNotify : public UAnimNotify
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	GENERATED_BODY()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
public:
 | 
					 | 
				
			||||||
	virtual void Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation) override;
 | 
					 | 
				
			||||||
	
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
@ -703,12 +703,8 @@ void APlayerCharacter::ThrowWeaponCallback()
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
	if (CurrentWeapon)
 | 
						if (CurrentWeapon)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		PlayAnimMontage(ThrowWeaponAnimMontage);
 | 
							PlayAnimMontage(ThrowAnimMontage);
 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
void APlayerCharacter::ThrowWeapon()
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
		FVector Location;
 | 
							FVector Location;
 | 
				
			||||||
		FVector BoxExtent;
 | 
							FVector BoxExtent;
 | 
				
			||||||
		GetActorBounds(true, Location, BoxExtent, false);
 | 
							GetActorBounds(true, Location, BoxExtent, false);
 | 
				
			||||||
@ -725,18 +721,15 @@ void APlayerCharacter::ThrowWeapon()
 | 
				
			|||||||
		Throwable->SetWeaponSkeletalMesh(GetCurrentWeapon()->GetSkeletalMesh());
 | 
							Throwable->SetWeaponSkeletalMesh(GetCurrentWeapon()->GetSkeletalMesh());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		RemoveCurrentWeaponFromInventory();
 | 
							RemoveCurrentWeaponFromInventory();
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void APlayerCharacter::ThrowExplosiveCallback()
 | 
					void APlayerCharacter::ThrowExplosiveCallback()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	if (ThrowableInventory.Num() > 0)
 | 
						if (ThrowableInventory.Num() > 0)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		PlayAnimMontage(ThrowExplosiveAnimMontage);
 | 
							PlayAnimMontage(ThrowAnimMontage);
 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
void APlayerCharacter::ThrowExplosive()
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
		FVector Location;
 | 
							FVector Location;
 | 
				
			||||||
		FVector BoxExtent;
 | 
							FVector BoxExtent;
 | 
				
			||||||
		GetActorBounds(true, Location, BoxExtent, false);
 | 
							GetActorBounds(true, Location, BoxExtent, false);
 | 
				
			||||||
@ -747,6 +740,7 @@ void APlayerCharacter::ThrowExplosive()
 | 
				
			|||||||
		SpawnLocation.Z += BoxExtent.Z;
 | 
							SpawnLocation.Z += BoxExtent.Z;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		GetWorld()->SpawnActor<AThrowable>(ThrowableInventory.Pop(), SpawnLocation, FRotator::ZeroRotator);
 | 
							GetWorld()->SpawnActor<AThrowable>(ThrowableInventory.Pop(), SpawnLocation, FRotator::ZeroRotator);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
AThrowable* APlayerCharacter::ThrowThrowable()
 | 
					AThrowable* APlayerCharacter::ThrowThrowable()
 | 
				
			||||||
 | 
				
			|||||||
@ -84,10 +84,7 @@ public:
 | 
				
			|||||||
	FOnEnemyHitDelegate OnEnemyHit;
 | 
						FOnEnemyHitDelegate OnEnemyHit;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	UPROPERTY(EditDefaultsOnly)
 | 
						UPROPERTY(EditDefaultsOnly)
 | 
				
			||||||
	UAnimMontage* ThrowWeaponAnimMontage;
 | 
						UAnimMontage* ThrowAnimMontage;
 | 
				
			||||||
	
 | 
					 | 
				
			||||||
	UPROPERTY(EditDefaultsOnly)
 | 
					 | 
				
			||||||
	UAnimMontage* ThrowExplosiveAnimMontage;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
protected:
 | 
					protected:
 | 
				
			||||||
	UPROPERTY(EditDefaultsOnly, BlueprintReadWrite)
 | 
						UPROPERTY(EditDefaultsOnly, BlueprintReadWrite)
 | 
				
			||||||
@ -220,12 +217,8 @@ public:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	void ThrowWeaponCallback();
 | 
						void ThrowWeaponCallback();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	void ThrowWeapon();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	void ThrowExplosiveCallback();
 | 
						void ThrowExplosiveCallback();
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	void ThrowExplosive();
 | 
					 | 
				
			||||||
	
 | 
					 | 
				
			||||||
	AThrowable* ThrowThrowable();
 | 
						AThrowable* ThrowThrowable();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	UFUNCTION(BlueprintCallable)
 | 
						UFUNCTION(BlueprintCallable)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user