public SpriteBoundsComponent(ITranslationComponent translation, ISourceComponent source, IScaleComponent scale)
        {
            _translation = translation;

            _source = source;

            _scale = scale;
        }
Beispiel #2
0
        public Sprite2D(ITexture2DComponent texture, ITranslationComponent translation)
        {
            IsVisible = true;

            SetComponent(texture);

            SetComponent(translation);

            SetComponent<IScaleComponent>(ScaleComponent.One);

            SetComponent<ISourceComponent>(new FixedSourceComponent(new Rectangle(0, 0, texture.Texture.Width, texture.Texture.Height)));
        }