2023-05-07 18:24:02 +01:00
|
|
|
|
using QSB.Messaging;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
2023-06-23 19:22:56 +01:00
|
|
|
|
using UnityEngine;
|
2023-05-07 18:24:02 +01:00
|
|
|
|
|
|
|
|
|
namespace QSB.HUD.Messages;
|
|
|
|
|
|
2023-06-23 19:22:56 +01:00
|
|
|
|
internal class ChatMessage : QSBMessage<(string message, Color color)>
|
2023-05-07 18:24:02 +01:00
|
|
|
|
{
|
2023-06-23 19:22:56 +01:00
|
|
|
|
public ChatMessage(string msg, Color color) : base((msg, color)) { }
|
2023-05-07 18:24:02 +01:00
|
|
|
|
|
|
|
|
|
public override void OnReceiveLocal() => OnReceiveRemote();
|
|
|
|
|
|
|
|
|
|
public override void OnReceiveRemote()
|
|
|
|
|
{
|
2023-06-23 19:22:56 +01:00
|
|
|
|
MultiplayerHUDManager.Instance.WriteMessage(Data.message, Data.color);
|
2023-05-07 18:24:02 +01:00
|
|
|
|
}
|
|
|
|
|
}
|