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

◆ Draw()

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

Definition at line 26 of file SaetharEyeGlowDrawLayer.cs.

27 {
28 //IL_0049: Unknown result type (might be due to invalid IL or missing references)
29 //IL_004e: Unknown result type (might be due to invalid IL or missing references)
30 //IL_0057: Unknown result type (might be due to invalid IL or missing references)
31 //IL_005d: Unknown result type (might be due to invalid IL or missing references)
32 //IL_0062: Unknown result type (might be due to invalid IL or missing references)
33 //IL_00d3: Unknown result type (might be due to invalid IL or missing references)
34 //IL_00d8: Unknown result type (might be due to invalid IL or missing references)
35 //IL_00dd: Unknown result type (might be due to invalid IL or missing references)
36 //IL_00e5: Unknown result type (might be due to invalid IL or missing references)
37 //IL_00e7: Unknown result type (might be due to invalid IL or missing references)
38 //IL_00f1: Unknown result type (might be due to invalid IL or missing references)
39 //IL_00fc: Unknown result type (might be due to invalid IL or missing references)
40 //IL_0103: Unknown result type (might be due to invalid IL or missing references)
41 if (drawInfo.shadow != 0f)
42 {
43 return;
44 }
45 if (textureAsset == null)
46 {
47 textureAsset = ModContent.Request<Texture2D>("ModLoader/Patreon.Saethar_Head_Glow");
48 }
50 if (asset != null && asset.IsLoaded)
51 {
52 Texture2D texture = asset.Value;
53 if (texture != null)
54 {
55 Vector2 headOrigin = drawInfo.headVect;
56 Player player = drawInfo.drawPlayer;
57 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));
58 drawInfo.DrawDataCache.Add(new DrawData(texture, position, player.bodyFrame, Color.White, player.headRotation, headOrigin, 1f, drawInfo.playerEffect));
59 }
60 }
61 }

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