Beispiel #1
0
        public override void Load()
        {
            base.Load();

            CollisionPoints.Add(new Vector2(0, 0));
            CollisionPoints.Add(new Vector2(Width, 0));
            CollisionPoints.Add(new Vector2(0, Height));
            CollisionPoints.Add(new Vector2(Width, Height));
        }
Beispiel #2
0
        public Opponent() : base(ServiceProvider.Instance.Resolve <SpriteBatch>(), Constants.EntityIds.OpponentId)
        {
            _moveCommand    = new MoveCommand <Opponent>(this, 3);
            _commandManager = ServiceProvider.Instance.Resolve <ICommandManager>();

            Color  = Color.Black;
            Height = 100;
            Width  = 20;

            CollisionPoints.Add(new Vector2(0, 0));
            CollisionPoints.Add(new Vector2(Width, 0));
            CollisionPoints.Add(new Vector2(0, Height));
            CollisionPoints.Add(new Vector2(Width, Height));
        }
Beispiel #3
0
        private void SetupPhysicalHitbox()
        {
            CollisionPoints.Add(new Point(-Width / 2, -Height / 2));
            CollisionPoints.Add(new Point(Width / 2, -Height / 2));
            CollisionPoints.Add(new Point(Width / 2, Height / 2));
            CollisionPoints.Add(new Point(-Width / 2, Height / 2));

            CollisionPoints.Add(new Point(-Width / 2, 0));
            CollisionPoints.Add(new Point(Width / 2, 0));

            CanBounce = false;

            _movementForce = new Force(0, 0, new HumanForceType(), -1);
            ApplyForce(_movementForce);
        }