Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using Microsoft.Xna.Framework;
- using Microsoft.Xna.Framework.Graphics;
- using Terraria;
- using Terraria.ID;
- using Terraria.ModLoader;
- namespace Skyanull.Projectiles
- {
- public class AquamarineBolt : ModProjectile
- {
- public override void SetDefaults()
- {
- projectile.width = 16;
- projectile.height = 16;
- projectile.friendly = true;
- projectile.penetrate = 3; //this is the projectile penetration
- projectile.hostile = false;
- projectile.magic = true; //this make the projectile do magic damage
- projectile.tileCollide = true; //this make that the projectile does not go thru walls
- projectile.ignoreWater = true;
- projectile.alpha = 255;
- }
- public override void AI()
- {
- //this is projectile dust
- int DustID2 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y + 2f), projectile.width / 5, projectile.height / 5, 92, projectile.velocity.X * 0.2f, projectile.velocity.Y * 0.2f, 10, default(Color), 1.8f);
- Main.dust[DustID2].noGravity = true;
- //this make that the projectile faces the right way
- projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement