Ejemplo n.º 1
0
    public static void Log(IBattleLogMessage message)
    {
        if (instance == null || message.GetMessageBody().Trim().Length == 0)
        {
            return;
        }

        GameObject newLog = Instantiate(instance.logMessage, instance.transform);

        newLog.GetComponent <LogHandler>().Init(message);

        instance.StartCoroutine(ScrollToBottom());
    }
Ejemplo n.º 2
0
    /// <summary>
    /// Prints a message(String) to the main UI screen, in the colour provided.
    /// </summary>
    /// <param name="message"></param>
    /// <param name="TeamColor"></param>
    public static void Log(string message, Color TeamColor)
    {
        if (instance == null)
        {
            return;
        }


        GameObject        newLog = Instantiate(instance.logMessage, instance.transform);
        IBattleLogMessage mess   = new DefaultLogMessage(message, TeamColor);

        newLog.GetComponent <LogHandler>().Init(mess);

        instance.StartCoroutine(ScrollToBottom());
    }