示例#1
0
文件: Shot.java 项目: jheysen/Test
 public static void DreamcastShot(
     BulletVector v, double spd, int cant, double radius, double rotation, Entity ent) {
   for (int i = 0; i < cant; i++) {
     v.PushBack(new Bullet(new Position(ent.pos), 1, 4, 2 * i * Math.PI / cant, spd));
     v.at(v.getSize() - 1).setRotation(rotation);
   }
 }
示例#2
0
文件: Shot.java 项目: jheysen/Test
 public static void SpiralShot(
     BulletVector v,
     double spd,
     int cant,
     int color,
     double initradius,
     double centrox,
     double centroy,
     double rotation) {
   for (int i = 0; i < cant; i++) {
     v.PushBack(
         new Bullet(
             new Position(
                 centrox + initradius * Math.cos(2 * i * Math.PI / cant),
                 centroy - initradius * Math.sin(2 * i * Math.PI / cant)),
             color,
             3,
             2 * i * Math.PI / cant,
             spd));
     v.at(v.getSize() - 1).setRotation(rotation);
   }
 }
示例#3
0
文件: Shot.java 项目: jheysen/Test
 public static void DNAShot(BulletVector v, double spd, double angle, double x, double y) {
   v.PushBack(new Bullet(new Position(x, y), 2, 7, angle, spd));
   v.at(v.getSize() - 1).setRotation(Math.PI / 6);
   v.PushBack(new Bullet(new Position(x, y), 3, 7, angle, spd));
   v.at(v.getSize() - 1).setRotation(-1.0 * Math.PI / 6);
 }