01.10.2020
+ Time controls (Stopwatch, Timers, Intervals) + Added smmeries to everything in SM.Base ~ Renamed Vectors to CVectors.
This commit is contained in:
parent
7acdba92f8
commit
97e638d9d9
44 changed files with 1092 additions and 289 deletions
|
|
@ -11,13 +11,13 @@ namespace SM2D.Drawing
|
|||
public DrawText(Font font, string text) : base(font)
|
||||
{
|
||||
_text = text;
|
||||
Transform.Size = new Vector2(1);
|
||||
Transform.Size = new CVector2(1);
|
||||
}
|
||||
|
||||
public override void Draw(DrawContext context)
|
||||
{
|
||||
base.Draw(context);
|
||||
context.Instances = _modelMatrixs;
|
||||
context.Instances = _instances;
|
||||
ApplyContext(ref context);
|
||||
|
||||
context.View = Transform.GetMatrix() * context.View;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ using SM.Base.Textures;
|
|||
using SM.Base.Types;
|
||||
using SM2D.Scene;
|
||||
using SM2D.Types;
|
||||
using Vector2 = SM.Base.Types.Vector2;
|
||||
|
||||
namespace SM2D.Drawing
|
||||
{
|
||||
|
|
@ -37,7 +36,7 @@ namespace SM2D.Drawing
|
|||
|
||||
public override void Draw(DrawContext context)
|
||||
{
|
||||
Transform.Size = new Vector2(Texture.Map.Width * MasterScale * Scale, Texture.Map.Height * MasterScale * Scale);
|
||||
Transform.Size = new CVector2(Texture.Map.Width * MasterScale * Scale, Texture.Map.Height * MasterScale * Scale);
|
||||
base.Draw(context);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
using OpenTK;
|
||||
using SM.Base.Scene;
|
||||
using Vector2 = SM.Base.Types.Vector2;
|
||||
using SM.Base.Types;
|
||||
|
||||
namespace SM2D.Scene
|
||||
{
|
||||
|
|
@ -8,7 +8,7 @@ namespace SM2D.Scene
|
|||
{
|
||||
public override bool Orthographic { get; } = true;
|
||||
|
||||
public Vector2 Position = new Vector2(0);
|
||||
public CVector2 Position = new CVector2(0);
|
||||
|
||||
protected override Matrix4 ViewCalculation()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ namespace SM2D.Scene
|
|||
{
|
||||
public ItemCollection()
|
||||
{
|
||||
Transform.Size = new Vector2(1);
|
||||
Transform.Size = new CVector2(1);
|
||||
}
|
||||
|
||||
public override void Draw(DrawContext context)
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ namespace SM2D.Shader
|
|||
protected override bool AutoCompile { get; } = true;
|
||||
|
||||
public Default2DShader() : base(new ShaderFileCollection(
|
||||
AssemblyUtility.ReadAssemblyFile("Shader.ShaderFiles.default.vert"),
|
||||
AssemblyUtility.ReadAssemblyFile("Shader.ShaderFiles.default.frag")))
|
||||
AssemblyUtility.ReadAssemblyFile("SM2D.Shader.ShaderFiles.default.vert"),
|
||||
AssemblyUtility.ReadAssemblyFile("SM2D.Shader.ShaderFiles.default.frag")))
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
using OpenTK;
|
||||
using SM.Base.Scene;
|
||||
using Vector2 = SM.Base.Types.Vector2;
|
||||
using SM.Base.Types;
|
||||
|
||||
namespace SM2D.Types
|
||||
{
|
||||
public class Transformation : GenericTransformation
|
||||
{
|
||||
public Vector2 Position = new Vector2(0);
|
||||
public Vector2 Size = new Vector2(50);
|
||||
public CVector2 Position = new CVector2(0);
|
||||
public CVector2 Size = new CVector2(50);
|
||||
public float Rotation;
|
||||
|
||||
public override Matrix4 GetMatrix()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue