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

◆ Draw()

override void Terraria.ModLoader.Default.Patreon.GuildpackEyeGlowDrawLayer.Draw ( ref PlayerDrawSet drawInfo)
inlineprotected

Definition at line 26 of file GuildpackEyeGlowDrawLayer.cs.

27 {
28 //IL_0037: Unknown result type (might be due to invalid IL or missing references)
29 //IL_003c: Unknown result type (might be due to invalid IL or missing references)
30 //IL_0045: Unknown result type (might be due to invalid IL or missing references)
31 //IL_004b: Unknown result type (might be due to invalid IL or missing references)
32 //IL_0050: Unknown result type (might be due to invalid IL or missing references)
33 //IL_00c1: Unknown result type (might be due to invalid IL or missing references)
34 //IL_00c6: Unknown result type (might be due to invalid IL or missing references)
35 //IL_00cb: Unknown result type (might be due to invalid IL or missing references)
36 //IL_00d3: Unknown result type (might be due to invalid IL or missing references)
37 //IL_00d5: Unknown result type (might be due to invalid IL or missing references)
38 //IL_00df: Unknown result type (might be due to invalid IL or missing references)
39 //IL_00ea: Unknown result type (might be due to invalid IL or missing references)
40 //IL_00f1: Unknown result type (might be due to invalid IL or missing references)
41 if (textureAsset == null)
42 {
43 textureAsset = ModContent.Request<Texture2D>("ModLoader/Patreon.Guildpack_Head_Glow");
44 }
45 if (textureAsset.IsLoaded)
46 {
47 Texture2D texture = textureAsset.Value;
48 if (texture != null)
49 {
50 Vector2 headOrigin = drawInfo.headVect;
51 Player player = drawInfo.drawPlayer;
52 Vector2 position = player.headPosition + drawInfo.headVect + new Vector2((float)(int)(drawInfo.Position.X + (float)player.width / 2f - (float)player.bodyFrame.Width / 2f - Main.screenPosition.X), (float)(int)(drawInfo.Position.Y + (float)player.height - (float)player.bodyFrame.Height + 4f - Main.screenPosition.Y));
53 drawInfo.DrawDataCache.Add(new DrawData(texture, position, player.bodyFrame, Color.White, player.headRotation, headOrigin, 1f, drawInfo.playerEffect));
54 }
55 }
56 }

References Terraria.Player.bodyFrame, Terraria.Player.headRotation, Terraria.Entity.height, Terraria.Main.screenPosition, Terraria.ModLoader.Default.Patreon.GuildpackEyeGlowDrawLayer.textureAsset, and Terraria.Entity.width.