Beispiel #1
0
        //static int spaceX=120; static int spaceY=18; static int width=150; static int widthS=40; static int height=16;
        public static float DrawBasicInfo(float startX, float startY, TDItem item)
        {
            int spaceX = 120; int spaceY = 18; int width = 150; int height = 16;

            TDE.DrawSprite(new Rect(startX, startY, 60, 60), item.icon);    startX += 65;

            TDE.Label(startX, startY += 5, width, height, "TypeID:", "The item name to be displayed in game");
            item.name = EditorGUI.TextField(new Rect(startX + spaceX - 65, startY, width, height), item.name);

            TDE.Label(startX, startY += spaceY, width, height, "Icon:", "The item icon to be displayed in game, must be a sprite");
            item.icon = (Sprite)EditorGUI.ObjectField(new Rect(startX + spaceX - 65, startY, width, height), item.icon, typeof(Sprite), false);

            TDE.Label(startX, startY += spaceY, width, height, "PrefabID: " + item.prefabID.ToString());
            //TDE.Label(startX+spaceX-65, startY, width, height, item.prefabID.ToString(), "");

            return(startY + spaceY);
        }
Beispiel #2
0
 public void Clone(TDItem src, TDItem tgt)
 {
     tgt.prefabID = src.prefabID;      tgt.instanceID = src.instanceID;
     tgt.icon     = src.icon;      tgt.name = src.name;              tgt.desp = src.desp;
 }