コード例 #1
0
        private static void DrawCircles(On.Terraria.Main.orig_DrawInfernoRings orig, Main self)
        {
            orig(self);

            //Only draws for local player

            Player        drawPlayer = Main.LocalPlayer;
            ClickerPlayer modPlayer  = drawPlayer.GetModPlayer <ClickerPlayer>();

            if (modPlayer.CanDrawRadius)
            {
                Color outer = modPlayer.clickerRadiusColorDraw * modPlayer.ClickerRadiusColorMultiplier;

                Vector2 center            = new Vector2((int)drawPlayer.Center.X, (int)drawPlayer.Center.Y + drawPlayer.gfxOffY);
                Vector2 motherboardCenter = default;
                int     radius            = (int)modPlayer.ClickerRadiusRealDraw;
                int     motherboardRadius = 0;

                if (modPlayer.SetMotherboardPlaced)
                {
                    //Don't use clickerMotherboardSetPosition here as it includes the wrong player.Center and possibly radius
                    motherboardCenter = center + modPlayer.CalculateMotherboardPosition(radius).Floor();
                    motherboardRadius = (int)modPlayer.ClickerRadiusMotherboardDraw;
                }

                Effect shader = SetupCircleEffect(center, radius, outer, center2: motherboardCenter, radius2: motherboardRadius);
                ApplyToScreenOnce(Main.spriteBatch, shader);
            }
        }
コード例 #2
0
        private void DrawVerlet(On.Terraria.Main.orig_DrawInfernoRings orig, Main self)
        {
            if (!Main.dedServ)
            {
                VerletManager.Instance.DrawChains(Main.spriteBatch);
            }

            orig(self);
        }
コード例 #3
0
        private void DrawTrails(On.Terraria.Main.orig_DrawInfernoRings orig, Main self)
        {
            if (!Main.dedServ)
            {
                TrailManager.Instance.DrawTrails();
            }

            orig(self);
        }
コード例 #4
0
        private static void DrawCircles(On.Terraria.Main.orig_DrawInfernoRings orig, Main self)
        {
            orig(self);

            //Only draws for local player

            Player drawPlayer = Main.LocalPlayer;

            if (Main.gameMenu)
            {
                return;
            }

            ClickerPlayer modPlayer = drawPlayer.GetModPlayer <ClickerPlayer>();

            if (!drawPlayer.dead && modPlayer.clickerSelected)
            {
                if (modPlayer.clickerDrawRadius)
                {
                    float glow = modPlayer.GlowVisual ? 0.6f : 0f;

                    Color outer = modPlayer.clickerRadiusColor * (0.2f + glow);


                    Vector2 center            = new Vector2((int)drawPlayer.Center.X, (int)drawPlayer.Center.Y + drawPlayer.gfxOffY);
                    Vector2 motherboardCenter = default;
                    int     radius            = (int)modPlayer.ClickerRadiusReal;
                    int     motherboardRadius = 0;

                    if (modPlayer.SetMotherboardDraw)
                    {
                        //Don't use clickerMotherboardSetPosition here as it includes the wrong player.Center
                        motherboardCenter = center + modPlayer.CalculateMotherboardPosition().Floor();
                        motherboardRadius = (int)modPlayer.ClickerRadiusMotherboard;
                    }

                    Effect shader = SetupCircleEffect(center, radius, outer, center2: motherboardCenter, radius2: motherboardRadius);
                    ApplyToScreenOnce(Main.spriteBatch, shader);
                }
            }
        }