PreDraw() public method

public PreDraw ( int i, int j, SpriteBatch spriteBatch ) : bool
i int
j int
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
return bool
Esempio n. 1
0
        //in Terraria.Main.Draw after calling SetAnimationFrame call
        //  if(!TileLoader.PreDraw(j, i, type, Main.spriteBatch))
        //  { TileLoader.PostDraw(j, i, type, Main.spriteBatch); continue; }
        public static bool PreDraw(int i, int j, int type, SpriteBatch spriteBatch)
        {
            foreach (GlobalTile globalTile in globalTiles)
            {
                if (!globalTile.PreDraw(i, j, type, spriteBatch))
                {
                    return(false);
                }
            }
            ModTile modTile = GetTile(type);

            if (modTile != null && !modTile.PreDraw(i, j, spriteBatch))
            {
                return(false);
            }
            return(true);
        }