Пример #1
0
 public static Dust[] DustSpread(Vector2 v, int width = 1, int height = 1, 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, width, height, dustType, speed.X, speed.Y, 0, default(Color), 2f);
     }
     return(dusts);
 }
Пример #2
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++;
     }
 }