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); } }
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); } }
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); } }
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; } } } }
//IMPLEMENTATION Done in the Children public virtual void SetNotificationTimer(NotificationTimerEnum notificationTimer) { throw new NotImplementedException(); }
public void RegisterNotificationDispatcherTimer_EnemyFireball(NotificationTimerEnum notificationTimer) { _uiMediator.RegisterNotificationDispatcherTimer_EnemyFireball(_enemyFireball, notificationTimer); }
public void RegisterNotificationDispatcherTimer_Wizard(NotificationTimerEnum notificationTimer) { _uiMediator.RegisterNotificationDispatcherTimer_Wizard(_player, _wizard, notificationTimer); }
public void RegisterNotificationDispatcherTimer_Bat(NotificationTimerEnum notificationTimer) { _uiMediator.RegisterNotificationDispatcherTimer_Bat(_player, _bat, notificationTimer); }
public void RegisterNotificationDispatcherTimer_Arrow(NotificationTimerEnum notificationTimer) { _uiMediator.RegisterNotificationDispatcherTimer_Arrow(_player, notificationTimer); }
public void RegisterNotificationDispatcherTimer_EnemyFireball(IEnemyFireball enemyFireball, NotificationTimerEnum notificationTimer) { _enemyFireball = enemyFireball; enemyFireball.SetNotificationTimer(notificationTimer); }
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); } } }
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); } } }