Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ AddShadowOrb()

static void Terraria.WorldGen.AddShadowOrb ( int x,
int y )
inlinestatic

Definition at line 23761 of file WorldGen.cs.

23762 {
23763 if (x < 10 || x > Main.maxTilesX - 10 || y < 10 || y > Main.maxTilesY - 10)
23764 {
23765 return;
23766 }
23767 for (int i = x - 1; i < x + 1; i++)
23768 {
23769 for (int j = y - 1; j < y + 1; j++)
23770 {
23771 if (Main.tile[i, j].active() && Main.tile[i, j].type == 31)
23772 {
23773 return;
23774 }
23775 }
23776 }
23777 short num = 0;
23778 if (crimson)
23779 {
23780 num += 36;
23781 }
23782 Main.tile[x - 1, y - 1].active(active: true);
23783 Main.tile[x - 1, y - 1].type = 31;
23784 Main.tile[x - 1, y - 1].frameX = num;
23785 Main.tile[x - 1, y - 1].frameY = 0;
23786 Main.tile[x, y - 1].active(active: true);
23787 Main.tile[x, y - 1].type = 31;
23788 Main.tile[x, y - 1].frameX = (short)(18 + num);
23789 Main.tile[x, y - 1].frameY = 0;
23790 Main.tile[x - 1, y].active(active: true);
23791 Main.tile[x - 1, y].type = 31;
23792 Main.tile[x - 1, y].frameX = num;
23793 Main.tile[x - 1, y].frameY = 18;
23794 Main.tile[x, y].active(active: true);
23795 Main.tile[x, y].type = 31;
23796 Main.tile[x, y].frameX = (short)(18 + num);
23797 Main.tile[x, y].frameY = 18;
23798 }
static bool crimson
Definition WorldGen.cs:932

References Terraria.Main.maxTilesX, Terraria.Main.maxTilesY, and Terraria.Main.tile.