Example #1
0
        // Idle Effect
        public override void HoldItem(Player player)
        {
            if (Main.time % 3 == 0)
            {
                Rectangle r = ModPlayerFists.GetPlayerOnHandRectangle(player, 10);

                Dust d = Main.dust[Dust.NewDust(r.TopLeft(), r.Width, r.Height, 135,
                                                (float)(player.direction * 2), 0f, 100, default(Color), 0.5f)];
                d.position += player.position - player.oldPosition;
                d.velocity  = Utils.RandomVector2(Main.rand, -0.5f, 0.5f) + player.velocity * 0.5f - new Vector2(0, player.gravDir);
                d.noGravity = true;
                d.fadeIn    = 0.85f;
                d.shader    = GameShaders.Armor.GetSecondaryShader(player.cHandOn, player);
            }
        }
Example #2
0
        public override void HoldItem(Player player)
        {
            #region Hold Glow effect
            // Dust effect when Idle
            Rectangle r = ModPlayerFists.GetPlayerOnHandRectangle(player, 4);

            Dust d = Dust.NewDustDirect
                         (r.TopLeft(), r.Width, r.Height, 111, 0f, 0f,
                         0, default(Color), 0.5f);
            d.velocity *= 0.1f;
            d.position += player.position - player.oldPosition;
            d.noGravity = true;
            d.fadeIn    = 0.6f;
            d.shader    = GameShaders.Armor.GetSecondaryShader(player.cHandOn, player);
            #endregion
        }
Example #3
0
        public override void HoldItem(Player player)
        {
            ModPlayerFists mpf = player.GetModPlayer <ModPlayerFists>();

            if (mpf.IsComboActive)
            {
                soundDelay--;
                if (soundDelay <= 0)
                {
                    Main.PlaySound(SoundID.Item22.WithVolume(0.3f), player.Center);
                    soundDelay = 25;
                }
                Rectangle r = ModPlayerFists.GetPlayerOnHandRectangle(player, 4);

                Dust d = Dust.NewDustDirect(r.TopLeft(), r.Width, r.Height, DustID.Smoke);

                float dir = Main.time % 2 == 0 ? -1f : 1f;
                d.position.X += dir * 4;
                d.velocity    = new Vector2(dir, -1f * player.gravDir);
                d.shader      = GameShaders.Armor.GetSecondaryShader(player.cHandOn, player);
            }
        }