Example #1
0
    public void RemoveMessage(MessagePlacement placement, int token)
    {
        switch (placement)
        {
        case MessagePlacement.Center:
            centerMsgQueue.Remove(token);
            break;

        case MessagePlacement.BottomLeft:
            bottomLeftMsgQueue.Remove(token);
            break;
        }
    }
Example #2
0
    public int DisplayMessage(MessagePlacement placement, string text)
    {
        int token = Random.Range(0, int.MaxValue);

        switch (placement)
        {
        case MessagePlacement.Center:
            centerMsgQueue.Add(token, new HUDMessage(text));
            break;

        case MessagePlacement.BottomLeft:
            bottomLeftMsgQueue.Add(token, new HUDMessage(text));
            break;
        }

        return(token);
    }