コード例 #1
0
        public SpriteBoundsComponent(ITranslationComponent translation, ISourceComponent source, IScaleComponent scale)
        {
            _translation = translation;

            _source = source;

            _scale = scale;
        }
コード例 #2
0
ファイル: Sprite2D.cs プロジェクト: hyjynx-studios/bizio
        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)));
        }