public override void SetStaticDefaults()
        {
            base.SetStaticDefaults();

            if (!Main.dedServ)
            {
                HeadLayer.RegisterData(Item.headSlot, new DrawLayerData()
                {
                    Texture = ModContent.Request <Texture2D>(Texture + "_Head_Glow"),
                    Color   = (PlayerDrawSet drawInfo) => new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, 75) * 0.8f
                });
            }

            ClickEffect.ChromaticBurst = ClickerSystem.RegisterClickEffect(Mod, "ChromaticBurst", null, null, 20, () => Color.Lerp(Color.White, Main.DiscoColor, 0.5f), delegate(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, int type, int damage, float knockBack)
            {
                bool spawnEffects = true;
                int chromatic     = ModContent.ProjectileType <RGBPro>();

                float total = 7f;
                int i       = 0;
                while (i < total)
                {
                    float hasSpawnEffects = spawnEffects ? 1f : 0f;
                    Vector2 toDir         = Vector2.UnitX * 0f;
                    toDir           += -Vector2.UnitY.RotatedBy(i * (MathHelper.TwoPi / total)) * new Vector2(10f, 10f);
                    int damageAmount = (int)(damage * 0.33f);
                    damageAmount     = damageAmount < 1 ? 1 : damageAmount;
                    Projectile.NewProjectile(source, position, toDir.SafeNormalize(Vector2.UnitY) * 10f, chromatic, damageAmount, 1f, Main.myPlayer, 0f, hasSpawnEffects);
                    i++;
                    spawnEffects = false;
                }
            });
        }
Exemple #2
0
        public override void SetStaticDefaults()
        {
            base.SetStaticDefaults();

            if (!Main.dedServ)
            {
                HeadLayer.RegisterData(Item.headSlot, new DrawLayerData()
                {
                    Texture = ModContent.Request <Texture2D>(Texture + "_Head_Glow"),
                    Color   = (PlayerDrawSet drawInfo) => Color.White * 0.8f * 0.75f
                });
            }
        }
Exemple #3
0
        public override void SetStaticDefaults()
        {
            base.SetStaticDefaults();

            if (!Main.dedServ)
            {
                glowmask = ModContent.Request <Texture2D>(Texture + "_Glow");

                HeadLayer.RegisterData(Item.headSlot, new DrawLayerData()
                {
                    Texture = ModContent.Request <Texture2D>(Texture + "_Head_Glow")
                });
            }
        }