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

◆ CheckProjectilePressurePad()

static void Terraria.WorldGen.CheckProjectilePressurePad ( int i,
int j )
inlinestatic

Definition at line 79910 of file WorldGen.cs.

79911 {
79913 Tile tile = Main.tile[i, j];
79914 int num = tile.frameX / 22;
79915 bool flag = false;
79916 if (num switch
79917 {
79918 0 => !canDown,
79919 1 => !canUp,
79920 2 => !canLeft,
79921 3 => !canRight,
79922 _ => true,
79923 })
79924 {
79925 if (canDown)
79926 {
79927 tile.frameX = 0;
79928 }
79929 else if (canUp)
79930 {
79931 tile.frameX = 22;
79932 }
79933 else if (canLeft)
79934 {
79935 tile.frameX = 44;
79936 }
79937 else if (canRight)
79938 {
79939 tile.frameX = 66;
79940 }
79941 else
79942 {
79943 KillTile(i, j);
79944 }
79945 }
79946 }
static void KillTile(int i, int j, bool fail=false, bool effectOnly=false, bool noItem=false)
static void CheckProjectilePressurePad_GetPossiblePlacementDirections(int i, int j, out bool canUp, out bool canLeft, out bool canRight, out bool canDown)

References Terraria.Main.tile.