public static void Message(int id, params string[] values) { if (instance == null) { return; } string str = MessageData.GetMessage(id); if (string.IsNullOrWhiteSpace(str)) { return; } string msg = string.Format(str, values); if (instance.last_msg == msg && instance.next_time > Time.time) { return; } instance.last_msg = msg; instance.messages.Push(msg); if (instance.next_time > Time.time) { instance.StartCoroutine(instance.MoveUp(msg, instance.next_time - Time.time)); instance.next_time = instance.next_time + instance.interval_time; return; } else { instance.StartCoroutine(instance.MoveUp(msg)); instance.next_time = Time.time + instance.interval_time; } }