public void AddMessage(int _actorID, string _message)
        {
            if (_message.IsNullOrEmpty() && _message == null)
            {
                _message = string.Empty;
            }
            OneColor oneColor = this.PersonColor(_actorID);
            string   self     = this.PersonName(_actorID) ?? string.Empty;

            if (self.IsNullOrEmpty() && _message.IsNullOrEmpty())
            {
                Debug.LogWarning((object)"AddNotify: キャラ名もメッセージも空っぽだったので追加せず");
            }
            else if (self.IsNullOrEmpty())
            {
                this.AddLog(_message);
            }
            else
            {
                if ((string)oneColor != (string)null)
                {
                    StringBuilder toRelease = StringBuilderPool.Get();
                    toRelease.AppendFormat("<color={0}>{1}</color>{2}", (object)oneColor, (object)self, (object)_message);
                    _message = toRelease.ToString();
                    StringBuilderPool.Release(toRelease);
                }
                else
                {
                    StringBuilder toRelease = StringBuilderPool.Get();
                    toRelease.AppendFormat("{0}{1}", (object)self, (object)_message);
                    _message = toRelease.ToString();
                    StringBuilderPool.Release(toRelease);
                }
                this.AddLog(_message);
            }
        }
Exemplo n.º 2
0
 public string OnFormatSaberColor(OneColor value) => value.ToString().Replace('_', ' ');