public override void SpecialDraw(int i, int j, SpriteBatch spriteBatch) { TileEntities.EntryPoint entryPoint = Utility.GetTileEntity <TileEntities.EntryPoint>(i, j); if (entryPoint == null || !Main.tile[i, j].IsTopLeft()) { return; } Vector2 position = new Point16(i, j).ToScreenCoordinates(); Tube tube = TerraFirma.Instance.TubeNetworkLayer[i, j]; if (tube.GetNeighbor(Side.Top) != null) { spriteBatch.Draw(ConnectionTexture, position + new Vector2(6, 0)); } if (tube.GetNeighbor(Side.Left) != null) { spriteBatch.Draw(ConnectionTexture, position + new Vector2(-2, 24), null, Color.White, -MathHelper.PiOver2, ConnectionTexture.Size() * 0.5f, Vector2.One, SpriteEffects.None, 0f); } if (tube.GetNeighbor(Side.Right) != null) { spriteBatch.Draw(ConnectionTexture, position + new Vector2(50, 24), null, Color.White, MathHelper.PiOver2, ConnectionTexture.Size() * 0.5f, Vector2.One, SpriteEffects.None, 0f); } }
public override void RightClick(int i, int j) { TileEntities.EntryPoint entryPoint = Utility.GetTileEntity <TileEntities.EntryPoint>(i, j); if (entryPoint == null) { return; } BaseLibrary.BaseLibrary.PanelGUI.UI.HandleUI(entryPoint); }
public override void KillMultiTile(int i, int j, int frameX, int frameY) { TileEntities.EntryPoint entryPoint = Utility.GetTileEntity <TileEntities.EntryPoint>(i, j); if (Main.netMode != NetmodeID.Server) { BaseLibrary.BaseLibrary.PanelGUI.UI.CloseUI(entryPoint); } Item.NewItem(i * 16, j * 16, 48, 64, mod.ItemType <Items.EntryPoint>()); entryPoint.Kill(i, j); }