Example #1
0
        public PlayerA(Game game, Vector2 startPosition)
            : base(game)
        {
            this.weapon = new WeaponPlayerA(this.Game) { DrawOrder = 1 }; // Todo: Factory
            this.Game.Components.Add(this.weapon);

            this.Lives = 2;

            this.Rotation = -MathHelper.PiOver2;
            this.Position = startPosition;
        }
Example #2
0
        public EnemyAutonomous(Game game, IPathFindingService pathFindingService, Vector2 startPosition, bool isBoss)
            : base(game)
        {
            this.Position = startPosition;
            this.isBoss = isBoss;
            this.Health = 100;

            this.pathFindingService = pathFindingService;

            this.behaviourStrategySeek = new BehaviourStrategySeek();
            this.behaviourStrategyFlee = new BehaviourStrategyFlee();

            this.Game.Components.Add(this);

            this.weapon = new WeaponEnemyA(this.Game); // Todo: Factory
            this.Game.Components.Add(this.weapon);
        }
Example #3
0
        public EnemyScripted(Game game, List<Vector2> waypoints, bool isBoss)
            : base(game)
        {
            this.waypoints = waypoints;
            this.isBoss = isBoss;
            this.Health = 100;

            this.Position = waypoints.First();
            waypoints.RemoveAt(0);
            this.targetPosition = waypoints.First();

            this.behaviourStrategy = new BehaviourStrategySeek();
            this.shootingStrategy = new WeaponStrategyEnemyA();

            this.Game.Components.Add(this);

            this.weapon = new WeaponEnemyA(this.Game); // Todo: Factory
            this.Game.Components.Add(this.weapon);
        }