void ShowNewsNotification() { GameObject obj = Instantiate( Resources.Load ("Prefabs/Event/NewsNotification")) as GameObject; m_hudService.HUDControl.AttachMid(ref obj); obj.transform.localScale = Vector3.one; obj.transform.localPosition = new Vector3(0, 0, -5); NewsNotificationItem newsItem = obj.GetComponent<NewsNotificationItem> (); string headline = currentScene.getCurrentEvent ().addnews.Replace ("<playername>", PlayerProfile.Get ().playerName); string icon = currentScene.getCurrentEvent ().addnewsIcon; string newsImage = currentScene.getCurrentEvent ().addnewsImage; NewsDataItem item = new NewsDataItem (headline, icon, newsImage, false, "Emi was in the newspapersEmi was " + "in the newspapersEmi was in the newspapersEmi was in the newspapersEmi was " + "in the newspapersEmi was in the newspapersEmi was in the newspapers"); newsItem.Initialize (gameObject, item._iconTextureName, item._headLine); if (currentScene.getCurrentEvent ().endChain == true) PlayerProfile.Get ().currentEventSet = -1; PlayerProfile.Get ().AddNews (item); m_soundService.PlaySound(Resources.Load("Sound/newsnotification03") as AudioClip, false); }
private static void _client_OnNewsMessage(NewsDataItem news) { // we received a news article OutputConsole.WriteLine($"{DateTime.UtcNow}: Received news item \"{news.Title}\"", ConsoleColor.Green); }
private void Socket_OnNewsMessage(NewsDataItem news) { WriteLog($"Received news item \"{news.Title}\""); }