Пример #1
0
    private static LabeledInformation CreateScore()
    {
        LabeledInformation result = LabeledInformation.Create();

        result.gameObject.name = "panel_Score";
        result.caption         = "Score";
        SetRectTransformSize(result.gameObject, itemSize_Score);
        return(result);
    }
Пример #2
0
    private static LabeledInformation CreateHitPoints()
    {
        LabeledInformation result = LabeledInformation.Create();

        result.gameObject.name = "panel_HitPoints";
        result.caption         = "Hit Points";
        SetRectTransformSize(result.gameObject, itemSize_HitPoints);
        return(result);
    }
Пример #3
0
    private static LabeledInformation CreateLabeledInformation(Buff buff)
    {
        LabeledInformation result = LabeledInformation.Create();

        result.gameObject.name = itemPrefix + buff.caption;
        result.caption         = buff.caption.Substring(0, shortCaptionLength);
        result.value           = buff.duration.ToString();

        return(result);
    }
Пример #4
0
    public static void Test()
    {
        LabeledInformation Li = LabeledInformation.Create();

        Li.gameObject.AddComponent <AlignIterator> ();

        RectTransform rt = Li.gameObject.transform as RectTransform;

        rt.offsetMin = new Vector2(5, 1);
        rt.offsetMax = rt.offsetMin + new Vector2(2, 1);

        Li.caption = "caption";
        Li.value   = "value";
        Li.Rebuild();
    }