DIFF

class NotificationSystemSource

Constructors 1

void NotificationSystem()
Referenced by InitInstance()

Constants 5

const float NOTIFICATION_FADE_TIME = 3.0
protected static const string JSON_FILE_PATH = "scripts/data/notifications.json"
protected static const int MAX_NOTIFICATIONS = 5
private static const float UPDATE_INTERVAL_THRESHOLD = 1.0
Referenced by Update()

Members 7

protected ref array<ref NotificationRuntimeData> m_TimeArray
protected ref array<ref NotificationRuntimeData> m_DeferredArray
protected ref map<NotificationType, ref NotificationData> m_DataArray
protected float m_TimeElapsed
Referenced by NotificationSystem(), and Update()
ref ScriptInvoker m_OnNotificationAdded = new ScriptInvoker()
ref ScriptInvoker m_OnNotificationRemoved = new ScriptInvoker()

Methods 12

static void InitInstance()
static void CleanupInstance()
References m_Instance
Referenced by DayZGame.~DayZGame()
static void SendNotificationToPlayerExtended(Man player, float show_time, string title_text, string detail_text = "", string icon = "")

Send custom notification to player from server

player
the target player to send notification to
show_time
amount of time this notification is displayed
title_text
the title text that is displayed in the notification
detail_text
additional text that can be added to the notification under the title - will not display additional text if not set
icon
the icon that is displayed in the notification - will use default icon if not set
static void SendNotificationToPlayerIdentityExtended(PlayerIdentity player, float show_time, string title_text, string detail_text = "", string icon = "")

Send custom notification to player identity from server

player
the target player to send notification to - if null, will send to all players
show_time
amount of time this notification is displayed
title_text
the title text that is displayed in the notification
detail_text
additional text that can be added to the notification under the title - will not display additional text if not set
icon
the icon that is displayed in the notification - will use default icon if not set
static void SendNotificationToPlayer(Man player, NotificationType type, float show_time, string detail_text = "")

Send notification from default types to player from server

player
the target player to send notification to
type
the type of notification to send - these can be viewed in /Scripts/Data/Notifications.json
show_time
amount of time this notification is displayed
detail_text
additional text that can be added to the notification under the title - will not display additional text if not set
static void SendNotificationToPlayerIdentity(PlayerIdentity player, NotificationType type, float show_time, string detail_text = "")

Send notification from default types to player identity from server

player
the target player to send notification to - if null, will send to all players
type
the type of notification to send - these can be viewed in /Scripts/Data/Notifications.json
show_time
amount of time this notification is displayed
detail_text
additional text that can be added to the notification under the title - will not display additional text if not set
static void AddNotification(NotificationType type, float show_time, string detail_text = "")

Send notification from default types to local player

type
the type of notification to send - these can be viewed in /Scripts/Data/Notifications.json
show_time
amount of time this notification is displayed
detail_text
additional text that can be added to the notification under the title - will not display additional text if not set
static void AddNotificationExtended(float show_time, string title_text, string detail_text = "", string icon = "")

Send custom notification from to local player

show_time
amount of time this notification is displayed
title_text
the title text that is displayed in the notification
detail_text
additional text that can be added to the notification under the title - will not display additional text if not set
icon
the icon that is displayed in the notification - will use default icon if not set
Referenced by DayZGame.OnRPC()
protected NotificationData GetNotificationData(NotificationType type)
Referenced by AddNotification()
static void LoadNotificationData()
Referenced by InitInstance()