Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_GameGameModeStateComponent.c
Go to the documentation of this file.
1 [ComponentEditorProps(category: "GameScripted/GameMode/Components", description: "Game Mode component responsible for controlling the main game state.")]
3 {
4 }
5 
6 class SCR_GameGameModeStateComponent : SCR_BaseGameModeStateComponent
7 {
8  [Attribute("0", uiwidget: UIWidgets.Slider, "Time limit of game mode in seconds.", params: "0 864000 1", category: "Game Mode")]
9  protected float m_fDuration;
10 
11  //------------------------------------------------------------------------------------------------
13  override float GetDuration()
14  {
15  return m_fDuration;
16  }
17 
18  //------------------------------------------------------------------------------------------------
21  override bool CanAdvanceState(SCR_EGameModeState nextState)
22  {
23  if (m_fDuration > 0.0 && m_pGameMode.GetElapsedTime() >= m_fDuration)
24  return true;
25 
26  return false;
27  }
28 
29  //------------------------------------------------------------------------------------------------
32  override bool GetAllowControls()
33  {
34  return true;
35  }
36 
37  //------------------------------------------------------------------------------------------------
40  {
41  return SCR_EGameModeState.GAME;
42  }
43 }
ComponentEditorProps
SCR_FragmentEntityClass ComponentEditorProps
m_fDuration
float m_fDuration
Definition: SendGoalMessage.c:437
SCR_BaseGameModeStateComponentClass
Definition: SCR_BaseGameModeStateComponent.c:2
SCR_GameGameModeStateComponentClass
Definition: SCR_GameGameModeStateComponent.c:2
m_pGameMode
SCR_BaseGameModeComponentClass m_pGameMode
The game mode entity this component is attached to.
GetAllowControls
override bool GetAllowControls()
Definition: SCR_GameGameModeStateComponent.c:32
GetDuration
override float GetDuration()
Definition: SCR_GameGameModeStateComponent.c:13
Attribute
SCR_GameGameModeStateComponentClass SCR_BaseGameModeStateComponentClass Attribute("0", uiwidget:UIWidgets.Slider, "Time limit of game mode in seconds.", params:"0 864000 1", category:"Game Mode")] protected float m_fDuration
CanAdvanceState
override bool CanAdvanceState(SCR_EGameModeState nextState)
Definition: SCR_GameGameModeStateComponent.c:21
params
Configs ServerBrowser KickDialogs params
Definition: SCR_NotificationSenderComponent.c:24
GetAffiliatedState
sealed override SCR_EGameModeState GetAffiliatedState()
Called on the authority when created to assign state this component belongs to.
Definition: SCR_GameGameModeStateComponent.c:39
SCR_EGameModeState
SCR_EGameModeState
Definition: SCR_EGameModeState.c:4
category
params category
Definition: SCR_VehicleDamageManagerComponent.c:180