Esempio n. 1
0
        public void RegisterNotificationDispatcherTimer_Arrow(IPlayer player, NotificationTimerEnum notificationTimer)
        {
            IWeapon player_ArrowAndBow = (player.GetWeapons()).Where(a => a.WeaponName == WeaponsListEnum.Bow).FirstOrDefault();

            if (player_ArrowAndBow != null)
            {
                player_ArrowAndBow.SetNotificationTimer(notificationTimer);
            }
        }
Esempio n. 2
0
 public override void SetNotificationTimer(NotificationTimerEnum notificationTimer)
 {
     if (IsWeaponReadyForStrike && notificationTimer == NotificationTimerEnum.TimerON)
     {
         var newPointToLeft = new Point(speedDisplacementToLeftX, 0);
         _weaponHelper.Process_WeaponStraightShootingAction(_shooter, DamagePower, _allTargets, AllImagesShootingArrowLeft, newPointToLeft);
         var newPointToRight = new Point(speedDisplacementToRightX, 0);
         _weaponHelper.Process_WeaponStraightShootingAction(_shooter, DamagePower, _allTargets, AllImagesShootingArrowRight, newPointToRight);
     }
 }
Esempio n. 3
0
 public void SetNotificationTimer(NotificationTimerEnum notificationTimer)
 {
     if (IsWeaponReadyToStrike && notificationTimer == NotificationTimerEnum.TimerON)
     {
         var newPointToLeft = new Point(speedDisplacementToLeftX, 0);
         Process_WeaponStraightShootingAction(AllImagesShootingLeftWeapon, newPointToLeft);
         var newPointToRight = new Point(speedDisplacementToRightX, 0);
         Process_WeaponStraightShootingAction(AllImagesShootingRightWeapon, newPointToRight);
     }
 }
Esempio n. 4
0
        public void RegisterNotificationDispatcherTimer_HeroPlayer(IPlayer player, NotificationTimerEnum notificationTimer)
        {
            player.PublishPlayerLocationPoint_NotifyObservers();

            //Remove Enemies_Unsubscribe_Observers
            var allEnemiesCount = player.GetAllEnemies().Count;

            if (allEnemiesCount > 0)
            {
                foreach (IEnemy enemy in player.GetAllEnemies())
                {
                    if (enemy.GetHealthPoints() <= 0)
                    {
                        player.RemoveEnemy_UnsubscribeObserver(enemy);
                        break;
                    }
                }
            }
        }
Esempio n. 5
0
 //IMPLEMENTATION Done in the Children
 public virtual void SetNotificationTimer(NotificationTimerEnum notificationTimer)
 {
     throw new NotImplementedException();
 }
Esempio n. 6
0
 public void RegisterNotificationDispatcherTimer_EnemyFireball(NotificationTimerEnum notificationTimer)
 {
     _uiMediator.RegisterNotificationDispatcherTimer_EnemyFireball(_enemyFireball, notificationTimer);
 }
Esempio n. 7
0
 public void RegisterNotificationDispatcherTimer_Wizard(NotificationTimerEnum notificationTimer)
 {
     _uiMediator.RegisterNotificationDispatcherTimer_Wizard(_player, _wizard, notificationTimer);
 }
Esempio n. 8
0
 public void RegisterNotificationDispatcherTimer_Bat(NotificationTimerEnum notificationTimer)
 {
     _uiMediator.RegisterNotificationDispatcherTimer_Bat(_player, _bat, notificationTimer);
 }
Esempio n. 9
0
 public void RegisterNotificationDispatcherTimer_Arrow(NotificationTimerEnum notificationTimer)
 {
     _uiMediator.RegisterNotificationDispatcherTimer_Arrow(_player, notificationTimer);
 }
Esempio n. 10
0
 public void RegisterNotificationDispatcherTimer_EnemyFireball(IEnemyFireball enemyFireball, NotificationTimerEnum notificationTimer)
 {
     _enemyFireball = enemyFireball;
     enemyFireball.SetNotificationTimer(notificationTimer);
 }
Esempio n. 11
0
        public void RegisterNotificationDispatcherTimer_Wizard(IPlayer player, IWizard wizard, NotificationTimerEnum notificationTimer)
        {
            Image wizardImage = wizard.EnemyImage;

            if (wizardImage != null)
            {
                if (notificationTimer == NotificationTimerEnum.TimerON)
                {
                    wizard.Move(wizard.MovementDirection);
                    EnemyStrikeHero(wizard, player);
                    SetWeaponNextStrike(wizard);
                }
            }
        }
Esempio n. 12
0
        public void RegisterNotificationDispatcherTimer_Bat(IPlayer player, IBat bat, NotificationTimerEnum notificationTimer)
        {
            Image batImage = bat.EnemyImage;

            if (batImage != null)
            {
                if (notificationTimer == NotificationTimerEnum.TimerON)
                {
                    //_bat.EnemyImage = batImage;
                    bat.Move(bat.MovementDirection);

                    EnemyStrikeHero(bat, player);
                }
            }
        }