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

◆ DrawInterface_1_2_DrawEntityMarkersInWorld()

static void Terraria.Main.DrawInterface_1_2_DrawEntityMarkersInWorld ( )
inlinestaticprivate

Definition at line 60090 of file Main.cs.

60091 {
60092 //IL_003a: Unknown result type (might be due to invalid IL or missing references)
60093 //IL_0055: Unknown result type (might be due to invalid IL or missing references)
60094 //IL_005a: Unknown result type (might be due to invalid IL or missing references)
60095 //IL_00a9: Unknown result type (might be due to invalid IL or missing references)
60096 //IL_00ae: Unknown result type (might be due to invalid IL or missing references)
60097 //IL_00b2: Unknown result type (might be due to invalid IL or missing references)
60098 //IL_00c0: Unknown result type (might be due to invalid IL or missing references)
60099 //IL_00c5: Unknown result type (might be due to invalid IL or missing references)
60100 //IL_00ca: Unknown result type (might be due to invalid IL or missing references)
60101 //IL_00cf: Unknown result type (might be due to invalid IL or missing references)
60102 //IL_00fd: Unknown result type (might be due to invalid IL or missing references)
60103 //IL_00ff: Unknown result type (might be due to invalid IL or missing references)
60104 //IL_0100: Unknown result type (might be due to invalid IL or missing references)
60105 //IL_0105: Unknown result type (might be due to invalid IL or missing references)
60106 //IL_00f0: Unknown result type (might be due to invalid IL or missing references)
60107 //IL_0125: Unknown result type (might be due to invalid IL or missing references)
60108 //IL_012a: Unknown result type (might be due to invalid IL or missing references)
60109 //IL_012c: Unknown result type (might be due to invalid IL or missing references)
60110 //IL_012e: Unknown result type (might be due to invalid IL or missing references)
60111 //IL_0138: Unknown result type (might be due to invalid IL or missing references)
60112 //IL_013d: Unknown result type (might be due to invalid IL or missing references)
60113 //IL_013f: Unknown result type (might be due to invalid IL or missing references)
60114 //IL_0149: Unknown result type (might be due to invalid IL or missing references)
60115 //IL_014e: Unknown result type (might be due to invalid IL or missing references)
60116 //IL_0166: Unknown result type (might be due to invalid IL or missing references)
60117 //IL_0168: Unknown result type (might be due to invalid IL or missing references)
60118 //IL_016f: Unknown result type (might be due to invalid IL or missing references)
60119 //IL_0176: Unknown result type (might be due to invalid IL or missing references)
60121 if (localPlayer.dead || !localPlayer.HeldItem.summon)
60122 {
60123 return;
60124 }
60125 spriteBatch.End();
60126 spriteBatch.Begin((SpriteSortMode)0, (BlendState)null, SamplerState.PointClamp, (DepthStencilState)null, (RasterizerState)null, (Effect)null, GameViewMatrix.ZoomMatrix);
60127 Texture2D value = TextureAssets.Extra[199].Value;
60128 Vector2 zero = Vector2.Zero;
60129 int minionAttackTargetNPC = localPlayer.MinionAttackTargetNPC;
60130 Rectangle value2 = default(Rectangle);
60131 ((Rectangle)(ref value2))._002Ector((int)screenPosition.X, (int)screenPosition.Y, screenWidth, screenHeight);
60132 for (int i = 0; i < 200; i++)
60133 {
60134 NPC nPC = npc[i];
60135 if (!nPC.active)
60136 {
60137 continue;
60138 }
60139 Rectangle hitbox = nPC.Hitbox;
60140 if (((Rectangle)(ref hitbox)).Intersects(value2))
60141 {
60142 Vector2 vector = nPC.Center - screenPosition;
60143 if (player[myPlayer].gravDir == -1f)
60144 {
60145 vector.Y = (float)screenHeight - vector.Y;
60146 }
60147 Vector2 position = vector + zero;
60148 if (i == minionAttackTargetNPC)
60149 {
60150 int frameY = (int)(GlobalTimeWrappedHourly * 10f) % 4;
60151 Rectangle rectangle = value.Frame(1, 4, 0, frameY, 0, -2);
60152 Vector2 origin = rectangle.Size() / 2f;
60153 Color color = Color.White * 0.7f;
60154 ((Color)(ref color)).A = (byte)(((Color)(ref color)).A / 2);
60155 spriteBatch.Draw(value, position, (Rectangle?)rectangle, color, 0f, origin, 1f, (SpriteEffects)0, 0f);
60156 }
60157 }
60158 }
60159 }
static Asset< Texture2D >[] Extra
static SpriteBatch spriteBatch
Definition Main.cs:1043
static int myPlayer
The index in F:Terraria.Main.player of this client's Player. If this is 255, this client is the ser...
Definition Main.cs:1958
static int screenHeight
Definition Main.cs:1870
static Vector2 screenPosition
The position of the top left corner of the screen in world coordinates. Modify in M:Terraria....
Definition Main.cs:1864
static SpriteViewMatrix GameViewMatrix
Definition Main.cs:255
static NPC[] npc
Definition Main.cs:1830
static int screenWidth
Definition Main.cs:1868
static Player LocalPlayer
Retrieves the T:Terraria.Player object for the local user. Shorthand for F:Terraria....
Definition Main.cs:3001
static Player[] player
Definition Main.cs:1960
static float GlobalTimeWrappedHourly
Definition Main.cs:433

References Terraria.Graphics.Light.Color, Terraria.GameContent.TextureAssets.Extra, Terraria.Main.GameViewMatrix, Terraria.Main.GlobalTimeWrappedHourly, Terraria.Main.LocalPlayer, Terraria.Main.myPlayer, Terraria.Main.npc, Terraria.Main.player, Terraria.Main.screenHeight, Terraria.Main.screenPosition, Terraria.Main.screenWidth, and Terraria.Main.spriteBatch.

Referenced by Terraria.Main.SetupDrawInterfaceLayers().

+ Here is the caller graph for this function: