Definition at line 7037 of file Player.cs.
7038 {
7039
7040
7041
7042
7045 if (Main.hasFocus &&
whoAmI == Main.myPlayer)
7046 {
7052 if (!Main.drawingPlayerChat && !Main.editSign && !Main.editChest && !Main.blockInput)
7053 {
7057 }
7058 }
7062 {
7064 {
7065 velocity.Y *= 0.9f;
7066 }
7069 {
7070 velocity.Y = 0
f -
num;
7071 }
7072 }
7074 {
7076 {
7077 velocity.Y *= 0.9f;
7078 }
7081 {
7083 }
7084 }
7086 {
7087 velocity.Y *= 0.9f;
7088 }
7089 else
7090 {
7092 }
7094 {
7096 {
7097 velocity.X *= 0.9f;
7098 }
7101 {
7102 velocity.X = 0
f -
num;
7103 }
7104 }
7106 {
7108 {
7109 velocity.X *= 0.9f;
7110 }
7113 {
7115 }
7116 }
7118 {
7119 velocity.X *= 0.9f;
7120 }
7121 else
7122 {
7124 }
7128 {
7130 }
7132 {
7134 }
7136 {
7140 {
7142 }
7143 }
7144 if (
position.X < Main.leftWorld + (
float)(Lighting.OffScreenTiles * 16) + 16
f)
7145 {
7146 position.X = Main.leftWorld + (float)(Lighting.OffScreenTiles * 16) + 16
f;
7148 }
7149 if (
position.X + (
float)
width > Main.rightWorld - (float)(Lighting.OffScreenTiles * 16) - 32
f)
7150 {
7151 position.X = Main.rightWorld - (float)(Lighting.OffScreenTiles * 16) - 32
f - (float)
width;
7153 }
7154 if (
position.Y < Main.topWorld + (
float)(Lighting.OffScreenTiles * 16) + 16
f)
7155 {
7156 position.Y = Main.topWorld + (float)(Lighting.OffScreenTiles * 16) + 16
f;
7157 if ((double)velocity.Y < -0.1)
7158 {
7159 velocity.Y = -0.1f;
7160 }
7161 }
7162 if (
position.Y > Main.bottomWorld - (
float)(Lighting.OffScreenTiles * 16) - 32
f - (
float)
height)
7163 {
7164 position.Y = Main.bottomWorld - (float)(Lighting.OffScreenTiles * 16) - 32
f - (float)
height;
7166 }
7167 }
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Vector2 position
The position of this Entity in world coordinates.
int width
The width of this Entity's hitbox, in pixels.
int height
The height of this Entity's hitbox, in pixels.
void TryOpeningInGameOptionsBasedOnInput()
References Terraria.Main.blockInput, Terraria.Main.bottomWorld, Terraria.Player.controlDown, Terraria.Player.controlJump, Terraria.Player.controlLeft, Terraria.Player.controlRight, Terraria.Player.controlUp, Terraria.Entity.direction, Terraria.Main.drawingPlayerChat, Terraria.Main.editChest, Terraria.Main.editSign, Terraria.Player.ghostFrame, Terraria.Player.ghostFrameCounter, Terraria.Main.hasFocus, Terraria.Entity.height, Terraria.Player.immune, Terraria.Player.immuneAlpha, Terraria.Main.leftWorld, Terraria.Main.myPlayer, Terraria.Lighting.OffScreenTiles, Terraria.Entity.position, Terraria.Main.topWorld, Terraria.GameInput.PlayerInput.Triggers, Terraria.Player.TryOpeningInGameOptionsBasedOnInput(), Terraria.Player.TrySyncingInput(), Terraria.Entity.velocity, Terraria.Entity.whoAmI, and Terraria.Entity.width.
Referenced by Terraria.Player.Update().