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

◆ CheckProjectilePressurePad()

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

Definition at line 76261 of file WorldGen.cs.

76262 {
76264 Tile tile = Main.tile[i, j];
76265 int num = tile.frameX / 22;
76266 bool flag = false;
76267 if (num switch
76268 {
76269 0 => !canDown,
76270 1 => !canUp,
76271 2 => !canLeft,
76272 3 => !canRight,
76273 _ => true,
76274 })
76275 {
76276 if (canDown)
76277 {
76278 tile.frameX = 0;
76279 }
76280 else if (canUp)
76281 {
76282 tile.frameX = 22;
76283 }
76284 else if (canLeft)
76285 {
76286 tile.frameX = 44;
76287 }
76288 else if (canRight)
76289 {
76290 tile.frameX = 66;
76291 }
76292 else
76293 {
76294 KillTile(i, j);
76295 }
76296 }
76297 }
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.