public void TargetMail_SearchResults(NetworkConnection target, string searchResults) { if (mail == null) { mail = FindObjectOfType <UCE_UI_SendMail>(); } List <MailSearch> results = new List <MailSearch>(); if (!string.IsNullOrEmpty(searchResults)) { string[] tmp = searchResults.Split('&'); for (int i = 0; i < tmp.Length; i++) { string[] tmp2 = tmp[i].Split('|'); MailSearch res = new MailSearch(); res.name = tmp2[0]; int.TryParse(tmp2[1], out res.level); res.guild = tmp2[2]; results.Add(res); } } if (mail != null) { mail.UpdateSearchResults(results); } }
// ----------------------------------------------------------------------------------- // UCE_UI_SendMail // ----------------------------------------------------------------------------------- public UCE_UI_SendMail() { // assign singleton only once (to work with DontDestroyOnLoad when // using Zones / switching scenes) if (singleton == null) { singleton = this; } }
public void TargetMail_SendResults(NetworkConnection target, string status, bool success) { if (mail == null) { mail = FindObjectOfType <UCE_UI_SendMail>(); } if (mail != null) { mail.MailMessageSent(status); } }