public BossStructure(DnK game, Entity parent, int iteration = 50, float step = 25, PolygonShape polygonShape = null) { _gameRef = game; _parent = parent; _iteration = iteration; _step = step; _iteration = iteration; _area = 0f; _bottomRightVertices = new List<Vector2>(); _bottomLeftVertices = new List<Vector2>(); _topRightVertices = new List<Vector2>(); _topLeftVertices = new List<Vector2>(); _bottomRightLastDirection = Direction.Left; _topRightLastDirection = Direction.Left; if (polygonShape != null) { _polygonShape = polygonShape; _size = polygonShape.GetSize(); } else { _polygonShape = new PolygonShape(_gameRef, null); GenerateBaseStructure(); } }
public BossPart( DnK gameRef, Boss bossRef, List<Player> playerList, MoverManager moverManager, List<BulletPattern> bulletPatterns, Color color, float initialHealth, int iteration = 50, float step = 25, List<Turret> turrets = null, PolygonShape polygonShape = null, bool mainPart = false) : base(gameRef) { _bossRef = bossRef; _mainPart = mainPart; _players = playerList; _moverManager = moverManager; _bulletPatterns = bulletPatterns ?? new List<BulletPattern>(); _health = initialHealth; _displayHp = false; _color = color; _iteration = iteration; _step = step; _accelerationDecreaseFactor = 0.00075f; _turrets = turrets ?? new List<Turret>(); _polygonShape = polygonShape; _collisionBoxesHp = new Dictionary<CollisionConvexPolygon, float>(); _targetPosition = Vector2.Zero; _targetAngle = 0f; }