Esempio n. 1
0
        private void Say(IScriptInstance script, float audibleDist, string message, int channel, EntityChatType type)
        {
            const int DEBUG_CHANNEL = 0x7FFFFFFF;

            // Special handling for debug chat
            if (channel == DEBUG_CHANNEL)
            {
                type = EntityChatType.Debug;
                channel = 0;
            }

            // Truncate long messages
            if (message.Length > 1023)
                message = message.Substring(0, 1023);

            // Send this chat to the scene
            script.Host.Scene.EntityChat(this, script.Host, audibleDist, message, channel, type);
        }
Esempio n. 2
0
        public void EntityChat(object sender, ISceneEntity source, float audibleDistance, string message, int channel, EntityChatType type)
        {
            EventHandler <ChatArgs> callback = OnEntityChat;

            if (callback != null)
            {
                callback(sender, new ChatArgs {
                    Source = source, AudibleDistance = audibleDistance, Message = message, Channel = channel, Type = type
                });
            }
        }
Esempio n. 3
0
        private void Say(IScriptInstance script, float audibleDist, string message, int channel, EntityChatType type)
        {
            const int DEBUG_CHANNEL = 0x7FFFFFFF;

            // Special handling for debug chat
            if (channel == DEBUG_CHANNEL)
            {
                type    = EntityChatType.Debug;
                channel = 0;
            }

            // Truncate long messages
            if (message.Length > 1023)
            {
                message = message.Substring(0, 1023);
            }

            // Send this chat to the scene
            script.Host.Scene.EntityChat(this, script.Host, audibleDist, message, channel, type);
        }