Exemple #1
0
    private static GameObject InstantiateMessage(int size, Vector3 colour,
                                                 Vector3 outlineColour, bool isCountdown = false)
    {
        string     prefabType   = isCountdown ? "CountdownMessage" : "PopupMessage";
        GameObject popupMessage = ( GameObject )Instantiate(Resources.Load(prefabType));
        PopupText  popup        = popupMessage.GetComponent <PopupText>();

        popup.SetFontSize(size);
        popup.SetFontColour(colour);
        popup.SetOutlineColour(outlineColour);

        return(popupMessage);
    }