Last active
January 23, 2016 14:22
-
-
Save mlewand/acd5e243f8d169f6e94c to your computer and use it in GitHub Desktop.
An example of UAnimNotify inheriting class.
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
// Fill out your copyright notice in the Description page of Project Settings. | |
#include "sample1.h" | |
#include "Enemy_Hit_Notifier.h" | |
UEnemy_Hit_Notifier::UEnemy_Hit_Notifier( const FObjectInitializer& ObjectInitializer /*= FObjectInitializer::Get()*/ ) | |
: Super( ObjectInitializer ) | |
{ | |
} | |
void UEnemy_Hit_Notifier::Notify( USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation ) | |
{ | |
Super::Notify( MeshComp, Animation ); | |
UE_LOG( LogTemp, Warning, TEXT( "Animation Hit Notifying!" ) ); | |
} |
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 created by Sahkan (https://answers.unrealengine.com/questions/231681/my-uanimnotify-custom-c-class-received-notify-wont.html) | |
// Fill out your copyright notice in the Description page of Project Settings. | |
#pragma once | |
#include "Animation/AnimNotifies/AnimNotify.h" | |
#include "Enemy_Hit_Notifier.generated.h" | |
UCLASS() | |
class UEnemy_Hit_Notifier : public UAnimNotify | |
{ | |
GENERATED_UCLASS_BODY() | |
virtual void Notify( USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation ) override; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment