Files
CalamityModPublic/Tiles/CryonicBrick.cs
T
Ozzatron 88c6fd68ec Refactored all tile code, mostly null safety
Vastly increased readability of all tile code, reorganized functions into different classes and made all functions either internal or guaranteed stable when called independently.
2019-11-30 13:57:32 -05:00

41 lines
1.2 KiB
C#

using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Tiles
{
public class CryonicBrick : ModTile
{
int subsheetHeight = 90;
int subsheetWidth = 234;
public override void SetDefaults()
{
Main.tileSolid[Type] = true;
Main.tileBlockLight[Type] = true;
CalamityUtils.MergeWithGeneral(Type);
CalamityUtils.MergeDecorativeTiles(Type);
soundType = 21;
minPick = 100;
drop = ModContent.ItemType<Items.Placeables.CryonicBrick>();
AddMapEntry(new Color(99, 131, 199));
}
public override bool CreateDust(int i, int j, ref int type)
{
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, 176, 0f, 0f, 1, new Color(255, 255, 255), 1f);
return false;
}
public override void AnimateIndividualTile(int type, int i, int j, ref int frameXOffset, ref int frameYOffset)
{
int xPos = i % 2;
int yPos = j % 4;
frameXOffset = xPos * subsheetWidth;
frameYOffset = yPos * subsheetHeight;
;
}
}
}