Exemplo n.º 1
0
        public Sprite2D(Vector2 Position, Vector2 Scale, Sprite2D reference, string Tag)
        {
            this.Position = Position;
            this.Scale    = Scale;
            this.Tag      = Tag;


            Sprite = reference.Sprite;

            Log.Info($"[SHAPE2D]({Tag}) - Has been registered! ");
            ExpressedEngine.RegisterSprite(this);
        }
Exemplo n.º 2
0
        public Sprite2D(Vector2 Position, Vector2 Scale, string Directory, string Tag)
        {
            this.Position  = Position;
            this.Scale     = Scale;
            this.Directory = Directory;
            this.Tag       = Tag;

            Image  tmp    = Image.FromFile($"Assets/Sprites/{Directory}.png");
            Bitmap sprite = new Bitmap(tmp, (int)this.Scale.X, (int)this.Scale.Y);

            Sprite = sprite;

            Log.Info($"[SHAPE2D]({Tag}) - Has been registered! ");
            ExpressedEngine.RegisterSprite(this);
        }