Ejemplo n.º 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;
        }
    }
Ejemplo n.º 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);
    }