Exemplo n.º 1
0
    private static TemporaryText CreateBuffCaption()
    {
        TemporaryText result = TemporaryText.Create();

        result.gameObject.name = "text_BuffCaption";
        SetRectTransformSize(result.gameObject, itemSize_BuffCaption);
        return(result);
    }
Exemplo n.º 2
0
    private static new GameWarning Create()
    {
        GameWarning result = TemporaryText.Create <GameWarning>();

        result.gameObject.transform.SetParent(Design.visibleArea.transform);

        Utils.ProvideCanvas(result.gameObject);

        RectTransform rt  = result.gameObject.transform as RectTransform;
        RectTransform rtp = result.gameObject.transform.parent as RectTransform;

        rt.offsetMin = (rtp.offsetMax - rtp.offsetMin - size) / 2;
        rt.offsetMax = rt.offsetMin + size;

        return(result);
    }