Пример #1
0
        public static CharLot NewCharLot(FontLot fontLot, string name = "", Transform parent = null)
        {
            var gob = new GameObject("charlot{" + name + "}");

            gob.transform.SetParent(parent);
            gob.transform.localPosition = Vector3.zero;
            var lot = gob.AddComponent <CharLot>();

            lot.fontLot = fontLot;
            lot.lotName = name;
            return(lot);
        }
Пример #2
0
        public static CharLot NewCharLot(FontLot fontLot, string name = "", Vector3 localPosition = default(Vector3), string startingText = "", Transform parent = null)
        {
            var gob = new GameObject("charlot{" + name + "}");

            gob.transform.SetParent(parent);
            gob.transform.localPosition = localPosition;
            var lot = gob.AddComponent <CharLot>();

            lot.fontLot = fontLot;
            lot.lotName = name;
            lot.Print(startingText);
            return(lot);
        }