コード例 #1
0
ファイル: NpcAgent.cs プロジェクト: ft-/silversim-testing
 internal void EnableListen()
 {
     if (m_ChatListener == null)
     {
         try
         {
             m_ChatService  = CurrentScene.GetService <ChatServiceInterface>();
             m_ChatListener = m_ChatService.AddAgentListen(0, string.Empty, UUID.Zero, string.Empty, GetMyUUID, GetMyPosition, OnChatReceive);
         }
         catch
         {
             /* intentionally ignored */
         }
     }
 }
コード例 #2
0
        public void StopTyping()
        {
            var chatService = CurrentScene.GetService <ChatServiceInterface>();

            chatService.Send(new ListenEvent
            {
                ID             = ID,
                Type           = ListenEvent.ChatType.StopTyping,
                Channel        = ListenEvent.PUBLIC_CHANNEL,
                GlobalPosition = GlobalPosition,
                Name           = Name,
                Message        = string.Empty,
                TargetID       = UUID.Zero,
                SourceType     = ListenEvent.ChatSourceType.Agent,
                OwnerID        = ID
            });
        }
コード例 #3
0
        public void DoSayTo(UUID target, int channel, string text)
        {
            ChatServiceInterface chatService = CurrentScene.GetService <ChatServiceInterface>();

            chatService.Send(new ListenEvent
            {
                ID             = ID,
                Type           = ListenEvent.ChatType.Say,
                Channel        = channel,
                GlobalPosition = GlobalPosition,
                Name           = Name,
                Message        = text,
                TargetID       = target,
                SourceType     = ListenEvent.ChatSourceType.Agent,
                OwnerID        = ID
            });
        }