Esempio n. 1
0
    public static Item2Face CreateFace(int num, Transform parent)
    {
        ChatManager.FaceSuit faceSuitByNum = ChatManager.Instance.GetFaceSuitByNum(num);
        Item2Face            item2Face     = ChatManager.CreatePrefab2Face("Item2Face" + num);

        UGUITools.ResetTransform(item2Face.get_transform(), parent);
        RectTransform rectTransform = item2Face.get_transform() as RectTransform;

        rectTransform.set_anchorMin(ConstVector2.LR);
        rectTransform.set_anchorMax(ConstVector2.LR);
        rectTransform.set_pivot(ConstVector2.LR);
        rectTransform.set_sizeDelta(Vector2.get_zero());
        item2Face.SetFaces(faceSuitByNum.icons);
        return(item2Face);
    }