Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_NetworkedStatsTest.c
Go to the documentation of this file.
1[ComponentEditorProps(category: "GameScripted/Misc", description: "")]
5
6class SCR_NetworkedStatsTestComponent : ScriptComponent
7{
8 SCR_NetworkedStatsComponent statsComponent;
9
10 //------------------------------------------------------------------------------------------------
11 override void EOnInit(IEntity owner)
12 {
14 return;
15
16 statsComponent = SCR_NetworkedStatsComponent.Cast(owner.FindComponent(SCR_NetworkedStatsComponent));
17 statsComponent.GetNetworkedStatPrefabData().GetOnStatsChanged(true).Insert(OnStatUpdate);
18 }
19
20 //------------------------------------------------------------------------------------------------
23 {
24 SCR_FPSNetworkedStat fpsStat = SCR_FPSNetworkedStat.Cast(stat);
26
27 if (fpsStat)
28 {
29 Print("Local FPS: " + fpsStat.GetLastCheckedLocalFPS());
30 Print("Authority FPS: " + fpsStat.GetLastCheckedAuthorityFPS());
31 }
32 else if (memoryStat)
33 {
34 Print("Local Memory: " + memoryStat.GetLastCheckedLocalMemory());
35 Print("Authority Memory: " + memoryStat.GetLastCheckedAuthorityMemory());
36 }
37 }
38
39 //------------------------------------------------------------------------------------------------
40 override void OnPostInit(IEntity owner)
41 {
42 SetEventMask(owner, EntityEvent.INIT);
43 }
44}
enum EAIGroupCombatMode ComponentEditorProps(category:"GameScripted/AI", description:"Component for utility AI system for groups")
SCR_NetworkedStatsTestComponentClass statsComponent
void OnStatUpdate(SCR_BaseNetworkedStat stat)
proto external int SetEventMask(notnull IEntity owner, int mask)
proto external Managed FindComponent(typename typeName)
static bool IsEditMode()
Definition Functions.c:1566
void EOnInit(IEntity owner)
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
EntityEvent
Various entity events.
Definition EntityEvent.c:14