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

◆ LookForDoorsToOpen()

void Terraria.GameContent.DoorOpeningHelper.LookForDoorsToOpen ( Player player)
inline

Definition at line 296 of file DoorOpeningHelper.cs.

297 {
298 PlayerInfoForOpeningDoors playerInfoForOpeningDoor = GetPlayerInfoForOpeningDoor(player);
299 if (playerInfoForOpeningDoor.intendedOpeningDirection == 0 && player.velocity.X == 0f)
300 {
301 return;
302 }
303 Point tileCoords = default(Point);
304 for (int i = playerInfoForOpeningDoor.tileCoordSpaceForCheckingForDoors.Left; i <= playerInfoForOpeningDoor.tileCoordSpaceForCheckingForDoors.Right; i++)
305 {
306 for (int j = playerInfoForOpeningDoor.tileCoordSpaceForCheckingForDoors.Top; j <= playerInfoForOpeningDoor.tileCoordSpaceForCheckingForDoors.Bottom; j++)
307 {
308 tileCoords.X = i;
309 tileCoords.Y = j;
311 }
312 }
313 }
PlayerInfoForOpeningDoors GetPlayerInfoForOpeningDoor(Player player)
void TryAutoOpeningDoor(Point tileCoords, PlayerInfoForOpeningDoors playerInfo)

References Terraria.GameContent.DoorOpeningHelper.GetPlayerInfoForOpeningDoor(), Terraria.GameContent.DoorOpeningHelper.TryAutoOpeningDoor(), Terraria.Entity.velocity, and Microsoft.Xna.Framework.Vector2.X.

Referenced by Terraria.GameContent.DoorOpeningHelper.Update().