Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
DeployMenuSystem.c
Go to the documentation of this file.
2 {
3  protected SCR_PlayerDeployMenuHandlerComponent m_LocalMenuHandler;
4  protected bool m_bReady = false;
5 
6  //------------------------------------------------------------------------------------------------
7  protected override void OnInit()
8  {
9  SCR_RespawnSystemComponent rsc = SCR_RespawnSystemComponent.GetInstance();
10  Enable(
11  !System.IsConsoleApp() &&
12  (rsc && rsc.CanOpenDeployMenu())
13  );
14  }
15 
16  //------------------------------------------------------------------------------------------------
18  void Register(SCR_PlayerDeployMenuHandlerComponent handler)
19  {
20  if (handler.GetPlayerController() == GetGame().GetPlayerController())
21  m_LocalMenuHandler = handler;
22  }
23 
24  //------------------------------------------------------------------------------------------------
26  void Unregister(SCR_PlayerDeployMenuHandlerComponent handler)
27  {
28  if (handler.GetPlayerController() == GetGame().GetPlayerController())
29  m_LocalMenuHandler = null;
30  }
31 
32  //------------------------------------------------------------------------------------------------
33  void SetReady(bool ready)
34  {
35  m_bReady = ready;
36  }
37 
38  //------------------------------------------------------------------------------------------------
39  protected override void OnUpdate(ESystemPoint point)
40  {
41  if (!m_LocalMenuHandler)
42  return;
43 
44  float dt = GetWorld().GetTimeSlice();
45 
46  if (!m_LocalMenuHandler.UpdateLoadingPlaceholder(dt))
47  return;
48 
49  if (!m_bReady)
50  return;
51 
52  m_LocalMenuHandler.Update(dt);
53  }
54 }
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
DeployMenuSystem
Definition: DeployMenuSystem.c:1
GetPlayerController
proto external PlayerController GetPlayerController()
Definition: SCR_PlayerDeployMenuHandlerComponent.c:307
Enable
void Enable(bool enable)
Definition: SCR_TabViewComponent.c:806
GameSystem
Definition: GameSystem.c:12
m_bReady
private bool m_bReady
Definition: SCR_PlayerDeployMenuHandlerComponent.c:19