PC Stable Documentation
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
ScriptInvoker Class Reference

ScriptInvoker Class provide list of callbacks
usage: More...

Private Member Functions

proto void Invoke (void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
 invoke call on all inserted methods with given arguments
 
proto bool Insert (func fn, int flags=EScriptInvokerInsertFlags.IMMEDIATE)
 insert method to list
 
proto bool Remove (func fn, int flags=EScriptInvokerRemoveFlags.ALL)
 remove specific call from list
 
proto int Count (func fn)
 count how many times this fn is actively present in the Invoker
 
proto native void Clear ()
 remove all calls from list
 

Detailed Description

ScriptInvoker Class provide list of callbacks
usage:

class Player
{
ref ScriptInvoker m_DeathInvoker = new ScriptInvoker();
void OnKilled()
{
m_DeathInvoker.Invoke(this);
}
}
void LogPlayerDeath(p)
{
Print("RIP " + p);
}
class Game
{
void RemovePlayer(Player p)
{
}
void GameOver()
{
}
}
void OnPlayerSpaned(Player p)
{
Game game = GetGame();
p.m_DeathInvoker.Insert(LogPlayerDeath);
p.m_DeathInvoker.Insert(game.RemovePlayer);
p.m_DeathInvoker.Insert(game.GameOver);
}
ScriptInvoker Class provide list of callbacks usage:
Definition tools.c:116
proto native CGame GetGame()
proto void Print(void var)
Prints content of variable to console/log.

Member Function Documentation

◆ Clear()

◆ Count()

proto int Count ( func  fn)
private

count how many times this fn is actively present in the Invoker

◆ Insert()

proto bool Insert ( func  fn,
int  flags = EScriptInvokerInsertFlags.IMMEDIATE 
)
private

insert method to list

Referenced by ActionTargetsCursor::ActionTargetsCursor(), ServerBrowserTab::Construct(), ConstructionActionData::ConstructionActionData(), ScriptedWidgetEventHandler::ContinuousActionProgress(), CraftingManager::CraftingManager(), CrossHairSelector(), DynamicMusicPlayer(), EffectSound::Event_OnRegistered(), UIScriptedMenu::GesturesMenu(), UIScriptedMenu::InGameMenuXbox(), Init(), PluginManager::Init(), UIScriptedMenu::Init(), DebugMonitor::Init(), WarningMenuBase::Init(), ScriptedWidgetEventHandler::Init(), InitEffect(), Inventory(), ScriptInvokerTests::InvokeInsert(), ScriptedWidgetEventHandler::ItemActionsWidget(), MainMenuButtonEffect::MainMenuButtonEffect(), ScriptedWidgetEventHandler::MainMenuDlcHandlerBase(), NotificationUI::NotificationUI(), PluginBase::OnInit(), UIPopupScript::OnOpen(), UIMenuPanel::OnShow(), ConsoleToolbarWidgetHandlerBase::OnWidgetScriptInit(), ScriptedWidgetEventHandler::OptionsMenuSounds(), Play(), ScriptedWidgetEventHandler::ProjectedCrosshair(), RadialProgressBar::RadialProgressBar(), UIScriptedMenu::RadialQuickbarMenu(), ServerBrowserTab::RefreshList(), AnalyticsManagerClient::RegisterEvents(), ServerBrowserTab(), SetEnableEventFrame(), EffectParticle::SetParticle(), UIScriptedMenu::SetServersLoadingTab(), SoftSkillManagerDebug(), ScriptInvokerTests::TestClearRunning(), ScriptInvokerTests::TestFirstUnique(), ScriptInvokerTests::TestInsertRemoveUnique(), ScriptInvokerTests::TestInsertRunning(), ScriptInvokerTests::TestInsertUniqueImmediate(), ScriptInvokerTests::TestInvokeRunning(), ScriptInvokerTests::TestSecondUnique(), and EffectSound::ValidateSoundWave().

◆ Invoke()

proto void Invoke ( void  param1 = NULL,
void  param2 = NULL,
void  param3 = NULL,
void  param4 = NULL,
void  param5 = NULL,
void  param6 = NULL,
void  param7 = NULL,
void  param8 = NULL,
void  param9 = NULL 
)
private

invoke call on all inserted methods with given arguments

Referenced by NotificationSystem::AddNotification(), NotificationSystem::AddNotificationExtended(), CheckValue(), ScriptedWidgetEventHandler::Close(), TriggerEvents::Enter(), SEffectManager::Event_OnFrameUpdate(), EffectSound::Event_OnSoundFadeInStopped(), EffectSound::Event_OnSoundFadeOutStarted(), EffectSound::Event_OnSoundWaveEnded(), EffectSound::Event_OnSoundWaveStarted(), ScriptInvokerTests::InvokeInvoke(), TriggerEvents::Leave(), ContentDLC::OnChange(), UIScriptedMenu::OnClick(), OnCommandDeathStart(), OnEvent(), OnlineServices::OnFriendsAsync(), Input::OnGamepadConnected(), Input::OnGamepadDisconnected(), Input::OnGamepadIdentification(), OnlineServices::OnGetServerModList(), Input::OnKeyboardConnected(), Input::OnKeyboardDisconnected(), Input::OnLastInputDeviceChanged(), OnlineServices::OnLoadServersAsync(), Input::OnMouseConnected(), Input::OnMouseDisconnected(), OnParticleEnd(), OnParticleParented(), OnParticleReset(), OnParticleStart(), OnParticleStop(), OnParticleUnParented(), OnlineServices::OnPermissionsAsync(), CGame::OnPostUpdate(), OptionsAccess::OnRevert(), UIScriptedMenu::OnSelectKBPreset(), CGame::OnUpdate(), ScriptedWidgetEventHandler::Open(), UIScriptedMenu::PerformSwitchPreset(), DayZProfilesOptions::SetProfileOption(), DayZProfilesOptions::SetProfileOptionFloat(), DayZProfilesOptions::SetProfileOptionInt(), Stop(), SwitchPreset(), ClientData::SyncEvent_OnEntityKilled(), ClientData::SyncEvent_OnPlayerIgnitedFireplace(), ClientData::SyncEvent_OnRecievedPlayerList(), ScriptInvokerTests::TestClearRunning(), ScriptInvokerTests::TestFirstUnique(), ScriptInvokerTests::TestInsertRemoveUnique(), ScriptInvokerTests::TestInsertRunning(), ScriptInvokerTests::TestInsertUniqueImmediate(), ScriptInvokerTests::TestInvokeRunning(), ScriptInvokerTests::TestSecondUnique(), NotificationSystem::Update(), and ActionVariantManager::UpdateVariants().

◆ Remove()

proto bool Remove ( func  fn,
int  flags = EScriptInvokerRemoveFlags.ALL 
)
private

The documentation for this class was generated from the following file: