コード例 #1
0
        public override void SetDefaults()
        {
            Main.tileSolid[Type]          = false;
            Main.tileNoAttach[Type]       = true;
            Main.tileFrameImportant[Type] = true;
            Main.tileNoFail[Type]         = true;
            dustType = mod.DustType(dustString);
            drop     = ModContent.ItemType <GlowingCrystalItem>();
            AddMapEntry(new Color(148, 134, 48));

            TileObjectData.newTile.CopyFrom(TileObjectData.Style1x1);
            TileObjectData.newTile.StyleHorizontal = true;

            /*TileObjectData.newTile.Height = 1;
             * TileObjectData.newTile.CoordinateHeights = new int[] {16};
             * TileObjectData.newTile.Width = 1;
             * TileObjectData.newTile.CoordinateWidth = 16;
             * TileObjectData.newTile.CoordinatePadding = 2;*/
            TileObjectData.newTile.AnchorTop        = AnchorData.Empty;
            TileObjectData.newTile.AnchorRight      = AnchorData.Empty;
            TileObjectData.newTile.AnchorLeft       = AnchorData.Empty;
            TileObjectData.newTile.AnchorBottom     = new AnchorData(AnchorType.SolidWithTop | AnchorType.SolidTile | AnchorType.Table, TileObjectData.newTile.Width, 0);
            TileObjectData.newTile.StyleWrapLimit   = 18;
            TileObjectData.newTile.RandomStyleRange = 17;
            TileObjectData.newAlternate.CopyFrom(TileObjectData.Style1x1);
            TileObjectData.newAlternate.StyleHorizontal  = true;
            TileObjectData.newAlternate.AnchorTop        = AnchorData.Empty;
            TileObjectData.newAlternate.AnchorRight      = new AnchorData(AnchorType.SolidSide | AnchorType.SolidTile, TileObjectData.newTile.Width, 0);
            TileObjectData.newAlternate.AnchorLeft       = AnchorData.Empty;
            TileObjectData.newAlternate.AnchorBottom     = AnchorData.Empty;
            TileObjectData.newAlternate.StyleWrapLimit   = 18;
            TileObjectData.newAlternate.RandomStyleRange = 17;
            TileObjectData.addAlternate(36);
            TileObjectData.newAlternate.CopyFrom(TileObjectData.Style1x1);
            TileObjectData.newAlternate.StyleHorizontal  = true;
            TileObjectData.newAlternate.AnchorTop        = AnchorData.Empty;
            TileObjectData.newAlternate.AnchorRight      = AnchorData.Empty;
            TileObjectData.newAlternate.AnchorLeft       = new AnchorData(AnchorType.SolidSide | AnchorType.SolidTile, TileObjectData.newTile.Width, 0);
            TileObjectData.newAlternate.AnchorBottom     = AnchorData.Empty;
            TileObjectData.newAlternate.StyleWrapLimit   = 18;
            TileObjectData.newAlternate.RandomStyleRange = 17;
            TileObjectData.addAlternate(54);
            TileObjectData.newAlternate.CopyFrom(TileObjectData.Style1x1);
            TileObjectData.newAlternate.StyleHorizontal  = true;
            TileObjectData.newAlternate.AnchorTop        = new AnchorData(AnchorType.SolidBottom | AnchorType.SolidTile, TileObjectData.newTile.Width, 0);
            TileObjectData.newAlternate.AnchorRight      = AnchorData.Empty;
            TileObjectData.newAlternate.AnchorLeft       = AnchorData.Empty;
            TileObjectData.newAlternate.AnchorBottom     = AnchorData.Empty;
            TileObjectData.newAlternate.StyleWrapLimit   = 18;
            TileObjectData.newAlternate.RandomStyleRange = 17;
            TileObjectData.addAlternate(18);
            TileObjectData.addTile(Type);


            //TileObjectData.newTile.FullCopyFrom(TileID.Crystals);
        }