コード例 #1
0
        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();
            }
        }