示例#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;
        }
示例#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();
        }
示例#3
0
 public RandomBehavior(IMovementDirectionManager movementDirectionManager)
 {
     _movementDirectionManager = movementDirectionManager;
     BehaviorTypeName          = BehaviorTypeEnum.Random;
 }