Exemplo n.º 1
0
        public Player(
            ICastle castle,
            IHealthInvoker healthInvoker,
            IImageManager imageManager,
            IMovementDirectionManager movementDirectionManager,
            IMovementStrategyInvoker movementStrategyInvoker,
            IAllWeaponsFactory weaponsFactory
            )
        {
            _castle                   = castle;
            _healthInvoker            = healthInvoker;
            _imageManager             = imageManager;
            _movementDirectionManager = movementDirectionManager;
            _movementStrategyInvoker  = movementStrategyInvoker;
            _weaponsFactory           = weaponsFactory;

            behaviorType = BehaviorTypeEnum.Targeted;

            AllSwordSwingImages         = new List <System.Windows.Controls.Image>();
            AllMaceSwingImages          = new List <System.Windows.Controls.Image>();
            AllArrowShootingLeftImages  = new List <System.Windows.Controls.Image>();
            AllArrowShootingRightImages = new List <System.Windows.Controls.Image>();
            weaponsCarried_Observers    = new List <IWeapon>();
            allEnemies_Observers        = new List <IEnemy>();
            allTargets = new List <ITarget>();

            ShootingDirection_Player = Key.None;
            _speedMovement           = 5;
        }
Exemplo n.º 2
0
        public Bat(
            IBehaviorInvoker behaviorInvoker,
            ICastle castle,
            IHealthInvoker healthInvoker,
            IImageManager imageManager,
            IMovementDirectionManager movementDirectionManager,
            IMovementStrategyInvoker movementStrategyInvoker
            )
        {
            _behaviorInvoker          = behaviorInvoker;
            _castle                   = castle;
            _healthInvoker            = healthInvoker;
            _imageManager             = imageManager;
            _movementDirectionManager = movementDirectionManager;
            _movementStrategyInvoker  = movementStrategyInvoker;

            EnemyName      = EnemyNameEnum.Bat;
            _speedMovement = 8;
            _strikePoints  = 5;
            SetBehaviorType(BehaviorTypeEnum.Random);
            MovementDirection = movementDirectionManager.GetRandomDirection();
        }