Exemple #1
0
        public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
        {
            float fireCount = Main.rand.NextFloat() * 3 + 4;
            float spread    = Main.rand.NextFloat() * 10 + 25;

            for (float i = 0; i < fireCount; ++i)
            {
                Vector2 speedZ = ModHelper.rotateByDegree(new Vector2(speedX, speedY), (i / fireCount - 0.5f) * spread);          //
                Terraria.Projectile.NewProjectile(position.X, position.Y, speedZ.X, speedZ.Y, 651, 1, 15f, Main.myPlayer);
            }
            for (float i = 0; i < 1; ++i)
            {
                Terraria.Projectile.NewProjectile(position.X, position.Y, speedX, speedY, 651, 80, 145f, Main.myPlayer);
            }
            return(false);
        }