Ejemplo n.º 1
0
        private EnemyFactory()
        {
            movementModuleFactory = MovementModuleFactory.GetInstance();
            weaponModuleFactory   = WeaponModuleFactory.GetInstance();

            enemy1NormalAnim = new Animator(
                "JetPack.media.ufos.green1_",
                4,
                Settings.Enemy1.normalAnimStepDuration
                );
            enemy2NormalAnim = new Animator(
                "JetPack.media.ufos.red1_",
                4,
                Settings.Enemy2.normalAnimStepDuration
                );
            enemy1ExplAnim = new Animator(
                "JetPack.media.explosions.explosion1_",
                1,
                Settings.Enemy1.explAnimStepDuration
                );
            enemy2ExplAnim = new Animator(
                "JetPack.media.explosions.explosion1_",
                1,
                Settings.Enemy2.explAnimStepDuration
                );
        }
Ejemplo n.º 2
0
 public Player()
 {
     pos = new SKPoint(
         Settings.Player.startPosX,
         Settings.Player.startPosY
         );
     speed               = 0;
     playerBitmapUp      = Helper.LoadBitmap("JetPack.media.player.up.png");
     playerBitmapDown    = Helper.LoadBitmap("JetPack.media.player.down.png");
     playerBitmapNeutral = Helper.LoadBitmap("JetPack.media.player.neutral.png");
     weaponModuleFactory = WeaponModuleFactory.GetInstance();
     loopTimer           = LoopTimer.GetInstance();
     weapon              = weaponModuleFactory.CreatePlayerWeapon(
         Settings.Player.Weapon.frequency,
         Settings.Player.Weapon.damage,
         Settings.Player.Weapon.projSpeed
         );
     weapon.SetFriendly();
     weapon.active = false;
     jetPackActive = false;
     animatorExpl  = new Animator(
         "JetPack.media.explosions.explosion1_",
         1,
         Settings.Player.explAnimStepDuration
         );
     explDuration    = Settings.Player.explAnimStepDuration * 1;
     animatorJetPack = new Animator(
         "JetPack.media.fire.fire_start_",
         "JetPack.media.fire.fire_hold_",
         "JetPack.media.fire.fire_stop_",
         8,
         23,
         19,
         Settings.Player.jetPackAnimStepDuration
         );
 }