Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
gamelib.c
Go to the documentation of this file.
1 #ifdef GAME_TEMPLATE
2 Game g_Game;
3 
4 Game GetGame()
5 {
6  return g_Game;
7 }
8 
9 class Game
10 {
11  ScriptModule GameScript;
12 
13  ScriptModule GetScriptModule()
14  {
15  return GameScript;
16  }
17 
18  void SetDebug(bool isDebug) {}
20 
25  void OnEvent(EventType eventTypeId, Param params)
26  {
27  Print("OnEvent");
28  }
29 
33  void OnAfterInit()
34  {
35  Print("OnAfterInit");
36  }
37 
42  void OnUpdate(float timeslice)
43  {
44 
45  }
46 
52  proto native bool SetWorldFile(string path, bool reload);
53 
57  proto native owned string GetWorldFile();
58 
62  bool OnGameStart()
63  {
64  return true;
65  }
66 
70  void OnGameEnd()
71  {
72  }
73 
77  void ShowLoadingAnim()
78  {
79  }
80 
84  void HideLoadingAnim()
85  {
86  }
87 
93  void UpdateLoadingAnim(float timeslice, float progress)
94  {
95  }
96 
102  proto native IEntity SpawnEntity(typename typeName);
103 
109  proto native IEntity SpawnEntityTemplate(vobject templateResource);
110 
117  proto native GenericComponent SpawnComponentTemplate(IEntity owner, vobject templateResource);
118 
119  proto native IEntity FindEntity(string name);
120 
121  proto native WorkspaceWidget GetWorkspace();
122 
126  proto native void RequestClose();
127 
132  proto native void RequestReload();
133 
137  proto native owned string GetBuildVersion();
138 
142  proto native owned string GetBuildTime();
143 
147  proto native GenericWorldEntity GetWorldEntity();
148 
149  proto native InputManager GetInputManager();
150  proto native MenuManager GetMenuManager();
151  proto native int GetTickCount();
152 }
153 
154 void GameLibInit()
155 {
156 
157 }
158 #endif
GetGame
proto native CGame GetGame()
Param
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition: param.c:11
vobject
Definition: proto.c:48
SpawnEntity
proto native void SpawnEntity(string sClassName, vector vPos, float fRange, int iCount)
Spawn an entity through CE.
Print
proto void Print(void var)
Prints content of variable to console/log.
IEntity
Definition: enentity.c:164
OnEvent
override void OnEvent(EventType eventTypeId, Param params)
Handles VON-related events.
Definition: connecterrorscriptmodule.c:35
EventType
TypeID EventType
Definition: enwidgets.c:55
OnUpdate
proto native void OnUpdate()
Definition: tools.c:349
g_Game
DayZGame g_Game
Definition: dayzgame.c:3727
WorkspaceWidget
Definition: enwidgets.c:176
name
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
ScriptModule
Module containing compiled scripts.
Definition: enscript.c:130
path
string path
Definition: optionselectormultistate.c:135