19.09.2020

+ Vector-classes
+ Added Background
~ Changed OpenTK.Vector2 to SM.Base.Types.Vector2
This commit is contained in:
Michel Fedde 2020-09-19 19:04:19 +02:00
parent a603ecc417
commit acccf5f0e7
22 changed files with 295 additions and 27 deletions

View file

@ -4,6 +4,8 @@ using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OpenTK;
using OpenTK.Graphics;
using SM.Base;
using SM2D;
using SM2D.Drawing;
@ -16,7 +18,7 @@ namespace SM_TEST
static Scene scene;
static void Main(string[] args)
{
GLWindow2D window = new GLWindow2D();
GLWindow2D window = new GLWindow2D {Scaling = new Vector2(0, 1000)};
window.SetScene(scene = new Scene());
window.Load += WindowOnLoad;
window.Run();
@ -24,7 +26,13 @@ namespace SM_TEST
private static void WindowOnLoad(object sender, EventArgs e)
{
scene.Objects.Add(new DrawTexture(new Bitmap("draconier_logo.png")));
scene.Objects.Add(new DrawTexture(new Bitmap("soldier_logo.png")));
scene.Objects.Add(new DrawTexture(new Bitmap("soldier_logo.png"))
{
Transform = { Position = new Vector2(100), Rotation = 45},
});
scene.Background = new DrawBackground(Color4.Beige);
}
}
}
}