Ejemplo n.º 1
0
 public void Initialize(string title, string message, Message.EType messageType, float displayTime)
 {
     _title.text = title;
     _message.Show(message);
     MessageType = messageType;
     DisplayTime = displayTime;
     AdjustToType(MessageType);
     _countdown = StartCoroutine(Countdown());
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Adds a new message to the messages list.
        /// </summary>
        /// <param name="type">The type of message to add.</param>
        /// <param name="text">The text of the message to add.</param>
        /// <param name="spontaneous"><c>true</c> if this message occurred due to something happening in the world, or <c>false</c> if it was in direct response to the signaller's actions.</param>
        private void AddMessage(Message.EType type, string text, bool spontaneous)
        {
            Message m = new Message();

            m.Type = type;
            m.Text = text;
            Messages.Add(m);
            if (spontaneous)
            {
                InhibitDeletingMessageUntil = DateTime.UtcNow.AddSeconds(1);
            }
        }
Ejemplo n.º 3
0
        private void AdjustToType(Message.EType type)
        {
            switch (type)
            {
            case Message.EType.Statement:
                StyleSheet = _statementStyle;
                break;

            case Message.EType.Tip:
                StyleSheet = _tipStyle;
                break;

            case Message.EType.Warning:
                StyleSheet = _warningStyle;
                break;

            default:
                break;
            }
        }
Ejemplo n.º 4
0
 public CreateMessageEA(string title, string message, Message.EType type = UI.Message.EType.Statement)
 {
     Title   = title;
     Message = message;
     Type    = type;
 }