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

◆ EmitGolfCartDust_StopForSolids()

static bool Terraria.DelegateMethods.EmitGolfCartDust_StopForSolids ( int x,
int y )
inlinestatic

Definition at line 704 of file DelegateMethods.cs.

705 {
706 if (x < 0 || x >= Main.maxTilesX || y < 0 || y >= Main.maxTilesY)
707 {
708 return false;
709 }
710 if (Main.tile[x, y] == null)
711 {
712 return false;
713 }
714 if (!Main.tile[x, y].active() || Main.tile[x, y].inActive() || Main.tileSolidTop[Main.tile[x, y].type] || !Main.tileSolid[Main.tile[x, y].type])
715 {
716 Dust.NewDustPerfect(new Vector2(x * 16 + 8, y * 16 + 8), 260, Vector2.UnitY * -0.2f);
717 return true;
718 }
719 return false;
720 }

References Terraria.Main.maxTilesX, Terraria.Main.maxTilesY, Terraria.Dust.NewDustPerfect(), Terraria.Main.tile, Terraria.Main.tileSolid, Terraria.Main.tileSolidTop, and Microsoft.Xna.Framework.Vector2.UnitY.