25 if ( detail_text !=
"" )
59 protected static const string JSON_FILE_PATH =
"Scripts/Data/notifications.json";
126 rpc.
Write(show_time);
127 rpc.
Write(title_text);
128 rpc.
Write(detail_text);
131 rpc.
Send(null,
ERPCs.RPC_SEND_NOTIFICATION_EXTENDED,
true, player);
161 rpc.
Write(show_time);
162 rpc.
Write(detail_text);
164 rpc.
Send(null,
ERPCs.RPC_SEND_NOTIFICATION,
true, player);
226 to_remove.Insert( data );
239 data_def.SetTime( time );
262 JsonFileLoader<map<NotificationType, NotificationData>>.JsonLoadFile(
JSON_FILE_PATH, data_array );
270 types.Insert( type_curr );
279 if ( types.Count() > 0 )
@ INVITE_FAIL_SAME_SERVER
static const float NOTIFICATION_FADE_TIME
void NotificationRuntimeData(float time, NotificationData data, string detail_text)
enum NotificationType m_StaticData
proto native float GetTickTime()
Returns current time from start of the game.
static void InitInstance()
static protected ref NotificationSystem m_Instance
protected ref array< ref NotificationRuntimeData > m_DeferredArray
ref ScriptInvoker m_OnNotificationAdded
static void SendNotificationToPlayer(Man player, NotificationType type, float show_time, string detail_text="")
Send notification from default types to player from server.
static void CleanupInstance()
static protected const string JSON_FILE_PATH
static NotificationSystem GetInstance()
static void Update(float timeslice)
static void SendNotificationToPlayerIdentityExtended(PlayerIdentity player, float show_time, string title_text, string detail_text="", string icon="")
Send custom notification to player identity from server.
static void SendNotificationToPlayerExtended(Man player, float show_time, string title_text, string detail_text="", string icon="")
Send custom notification to player from server.
void NotificationSystem()
static protected const int MAX_NOTIFICATIONS
protected ref array< ref NotificationRuntimeData > m_TimeArray
static void LoadNotificationData()
protected ref map< NotificationType, ref NotificationData > m_DataArray
static void AddNotificationExtended(float show_time, string title_text, string detail_text="", string icon="")
Send custom notification from to local player.
static void AddNotification(NotificationType type, float show_time, string detail_text="")
Send notification from default types to local player.
ref ScriptInvoker m_OnNotificationRemoved
static void SendNotificationToPlayerIdentity(PlayerIdentity player, NotificationType type, float show_time, string detail_text="")
Send notification from default types to player identity from server.
protected NotificationData GetNotificationData(NotificationType type)
The class that will be instanced (moddable)
ScriptInvoker Class provide list of callbacks usage:
proto void Invoke(void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
invoke call on all inserted methods with given arguments
proto native void Send(Object target, int rpc_type, bool guaranteed, PlayerIdentity recipient=NULL)
Initiate remote procedure call. When called on client, RPC is evaluated on server; When called on ser...
proto bool Write(void value_out)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()