Exemple #1
0
 public static Dust[] DustSpread(Vector2 v, int dustType = 6, int total = 10, float scale = 1f)
 {
     Dust[] dusts = new Dust[total];
     for (int k = 0; k < total; k++)
     {
         Vector2 speed = ArchaeaNPC.AngleToSpeed(ArchaeaNPC.RandAngle(), 8f);
         dusts[k] = Dust.NewDustDirect(v + speed, 1, 1, dustType, speed.X, speed.Y, 0, default(Color), 2f);
     }
     return(dusts);
 }
Exemple #2
0
 public static Dust[] DustSpread(Vector2 v, int width = 1, int height = 1, int dustType = 6, int total = 10, float scale = 1f, Color color = default(Color), bool noGravity = false, float spreadSpeed = 8f)
 {
     Dust[] dusts = new Dust[total];
     for (int k = 0; k < total; k++)
     {
         Vector2 speed = ArchaeaNPC.AngleToSpeed(ArchaeaNPC.RandAngle(), spreadSpeed);
         dusts[k]           = Dust.NewDustDirect(v + speed, width, height, dustType, speed.X, speed.Y, 0, color, scale);
         dusts[k].noGravity = noGravity;
     }
     return(dusts);
 }
Exemple #3
0
 private void Attack()
 {
     projIndex = 0;
     for (int k = -3; k <= 3; k += 2)
     {
         proj[projIndex]             = Projectile.NewProjectileDirect(npc.Center, ArchaeaNPC.AngleToSpeed(ArchaeaNPC.RandAngle(), 4f), ProjectileID.ShadowFlame, 15, 5f);
         proj[projIndex].tileCollide = false;
         proj[projIndex].timeLeft    = 180;
         proj[projIndex].hostile     = true;
         proj[projIndex].friendly    = false;
         if (Main.netMode == 2)
         {
             NetMessage.SendData(MessageID.SyncProjectile, -1, -1, null, proj[projIndex].whoAmI);
         }
         projIndex++;
     }
 }
Exemple #4
0
 public override void Attack()
 {
     projIndex = 0;
     for (int k = -3; k <= 3; k += 2)
     {
         bombs[projIndex]          = Projectile.NewProjectileDirect(npc.Center, ArchaeaNPC.AngleToSpeed(ArchaeaNPC.RandAngle(), 4f), ProjectileID.BouncyGrenade, 15, 5f);
         bombs[projIndex].timeLeft = 180;
         bombs[projIndex].hostile  = true;
         bombs[projIndex].friendly = false;
         projIndex++;
     }
 }