HAxis sos

This commit is contained in:
guus
2018-08-11 16:46:35 +02:00
commit 510654f8a1
480 changed files with 54126 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2016.
#pragma once
#include "ComponentAssetBroker.h"
#include "FMODEvent.h"
//////////////////////////////////////////////////////////////////////////
// FFMODAssetBroker
class FFMODAssetBroker : public IComponentAssetBroker
{
public:
UClass* GetSupportedAssetClass() override
{
return UFMODEvent::StaticClass();
}
virtual bool AssignAssetToComponent(UActorComponent* InComponent, UObject* InAsset) override
{
if (UFMODAudioComponent* AudioComp = Cast<UFMODAudioComponent>(InComponent))
{
UFMODEvent* Event = Cast<UFMODEvent>(InAsset);
if ((Event != NULL) || (InAsset == NULL))
{
AudioComp->Event = Event;
return true;
}
}
return false;
}
virtual UObject* GetAssetFromComponent(UActorComponent* InComponent) override
{
if (UFMODAudioComponent* AudioComp = Cast<UFMODAudioComponent>(InComponent))
{
return AudioComp->Event.Get();
}
return NULL;
}
};