Example #1
0
 public void fireProjectile(CommandProjectileSpawn s)
 {
     if (status == Status.Active)
     {
         alienTree.performLowest(s.getColumnNum());
     }
     s.addToReceiver();
 }
Example #2
0
        public void addCommand(CommandProjectileSpawn spawn)
        {
            DLink temp = new CommandProjectileSpawnData(spawn);

            if (projectileSpawnHead == null)
            {
                this.projectileSpawnHead = temp;
            }
            else
            {
                temp.pNext          = projectileSpawnHead;
                projectileSpawnHead = temp;
            }
        }
        public CommandProjectileFactory()
        {
            command = new CommandProjectileSpawnController();
            CommandProjectileSpawn s = new CommandProjectileSpawn(MovementControllerFactory.getFactory.getController());

            for (int i = 0; i < 10; i = i + 2)
            {
                s.addColumn(i);
            }

            s.addOffset(2500);
            command.addCommand(s);
            s = new CommandProjectileSpawn(MovementControllerFactory.getFactory.getController());
            for (int i = 9; i > 0; i = i - 2)
            {
                s.addColumn(i);
            }

            s.addOffset(2000);
            command.addCommand(s);
        }
 public CommandProjectileSpawnData(CommandProjectileSpawn spawn)
 {
     this.spawn = spawn;
 }