Esempio n. 1
0
//------------------------------------------------------------------------
void SUIElementLuaCallback::Clear()
{
	if (gEnv->pFlashUI)
	{
		const int count = gEnv->pFlashUI->GetUIElementCount();
		for (int i = 0; i < count; ++i)
		{
			IUIElementIteratorPtr elements = gEnv->pFlashUI->GetUIElement(i)->GetInstances();
			while (IUIElement* pInst = elements->Next())
				pInst->RemoveEventListener(this);
		}
	}
	ClearCallbacks();
}
void USocketIOClientComponent::UninitializeComponent()
{
	//Because our connections can last longer than game world 
	//end, we let plugin-scoped structures manage our memory.
	//We must ensure we set our pointer to null however.

	ClearCallbacks();

	//If we're a regular connection we should close and release when we quit
	if (!bPluginScopedConnection)
	{
		ISocketIOClientModule::Get().ReleaseNativePointer(NativeClient);
		NativeClient = nullptr;
	}

	//UE_LOG(SocketIOLog, Log, TEXT("UninitializeComponent() call"));
	Super::UninitializeComponent();
}
USocketIOClientComponent::USocketIOClientComponent(const FObjectInitializer &init) : UActorComponent(init)
{
	bShouldAutoConnect = true;
	bWantsInitializeComponent = true;
	bAutoActivate = true;
	NativeClient = nullptr;
	bLimitConnectionToGameWorld = true;
	AddressAndPort = FString(TEXT("http://localhost:3000"));	//default to 127.0.0.1
	SessionId = FString(TEXT("Invalid"));
	
	//Plugin scoped utilities
	bPluginScopedConnection = false;
	PluginScopedId = TEXT("Default");
	bVerboseConnectionLog = true;
	ReconnectionTimeout = 0.f;
	MaxReconnectionAttempts = -1.f;
	ReconnectionDelayInMs = 5000;

	ClearCallbacks();
}
Esempio n. 4
0
CUpdateableCtrl::CUpdateableCtrl()
{
    ClearCallbacks();
}
Esempio n. 5
0
//------------------------------------------------------------------------
void SUIEventSystemLuaCallback::Clear()
{
	m_Listener.clear();
	ClearCallbacks();
}
Esempio n. 6
0
//------------------------------------------------------------------------
void SUIActionLuaCallback::Clear()
{
	ClearCallbacks();
}