Ejemplo n.º 1
0
//void UGAAttributesBase::PostNetReceive()
//{
//	Super::PostNetReceive();
//}
void UGAAttributesBase::InitializeAttributes(UAFAbilityComponent* InOwningAttributeComp)
{
	OwningAttributeComp = InOwningAttributeComp;
	for (TFieldIterator<UStructProperty> StrIt(GetClass(), EFieldIteratorFlags::IncludeSuper); StrIt; ++StrIt)
	{
		FAFAttributeBase* attr = StrIt->ContainerPtrToValuePtr<FAFAttributeBase>(this);
		if (attr)
		{
			attr->InitializeAttribute(InOwningAttributeComp, StrIt->GetFName());
			TickableAttributes.Add(attr);
		}
	}
	/*
		Bind Delegates to map > For each attribute, so we don't store them inside attribute
		but in this class.
	*/
	/*for (TFieldIterator<UProperty> PropIt(GetClass(), EFieldIteratorFlags::IncludeSuper); PropIt; ++PropIt)
	{
		int32 FoundIndex = -1;
		FoundIndex = PropIt->GetName().Find("PostAttribute");
		FAFAttributeBase* attrPtr = GetAttribute(FGAAttribute(PropIt->GetFName()));
		if (attrPtr)
		{
			return attrPtr->InitializeAttribute();
		}
	}*/
	BP_InitializeAttributes();
}
Ejemplo n.º 2
0
void UGAAttributesBase::InitializeAttributes()
{
	BP_InitializeAttributes();
}