Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
messagereceiverbase.c
Go to the documentation of this file.
2 {
3  // message system
4  PluginMessageManager m_ModuleMessageManager;
5  string m_System;
6 
7  void OnReceive(int channel) {}
8  void OnReceiveInt(int channel, int value) {}
9  void OnReceiveFloat(int channel, float value) {}
10  void OnReceiveString(int channel, string value) {}
12  void OnReceiveParam(int channel, Param params) {}
13 
14  void MessageReceiverBase()
15  {
16  m_ModuleMessageManager = PluginMessageManager.Cast(GetPlugin(PluginMessageManager));
17  }
18 
19  void Subscribe(int channel)
20  {
21  m_ModuleMessageManager.Subscribe(this,channel);
22  }
23 
24  void Unsubscribe(int channel)
25  {
26  if( IsPluginManagerExists() ) m_ModuleMessageManager.Unsubscribe(this,channel);
27  }
28 
29  void UnsubscribeAll()
30  {
31  if( IsPluginManagerExists() ) m_ModuleMessageManager.UnsubscribeAll(this);
32  }
33 
34  void Broadcast(int channel)
35  {
36  m_ModuleMessageManager.Broadcast(channel);
37  }
38 
39  void BroadcastInt(int channel, int value)
40  {
41  m_ModuleMessageManager.BroadcastInt(channel, value);
42  }
43 
44  void BroadcastFloat(int channel, float value)
45  {
46  m_ModuleMessageManager.BroadcastFloat(channel, value);
47  }
48 
49  void BroadcastString(int channel, string value)
50  {
51  m_ModuleMessageManager.BroadcastString(channel, value);
52  }
53 
54  void BroadcastParam(int channel,Param params)
55  {
56  m_ModuleMessageManager.BroadcastParam(channel, params);
57  }
58 
59  //Messaging system
60  void Log(string message)
61  {
62  Debug.Log(message,m_System);
63  }
64 
65 }
Param
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition: param.c:11
m_System
string m_System
Definition: modifierbase.c:13
GetPlugin
PluginBase GetPlugin(typename plugin_type)
Definition: pluginmanager.c:316
IsPluginManagerExists
bool IsPluginManagerExists()
Definition: pluginmanager.c:306
MessageReceiverBase
Definition: messagereceiverbase.c:1
Debug
Definition: debug.c:13