1.0.10
+ Added property "CalculatedWorldScale", what always updates the world scale if required. ~ Changed how items can be inserted to a item collection. ~ AddObject(), AddScript(), RemoveObject(), RemoveScript() are now obsolte. ~ Fixed a issue, where the background was using the default mesh, what caused some visual errors if changed.
This commit is contained in:
parent
6cb1fea19a
commit
35c433fa85
7 changed files with 70 additions and 16 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
using System;
|
||||
using OpenTK;
|
||||
using SM.Base;
|
||||
using SM.Base.Scene;
|
||||
using SM.Base.Types;
|
||||
using SM.Base.Window;
|
||||
|
|
@ -38,6 +39,22 @@ namespace SM2D.Scene
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Will always return a updated version of the world scale.
|
||||
/// </summary>
|
||||
public Vector2 CalculatedWorldScale
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ResizeCounter != _resizeCounter || _updateWorldScale)
|
||||
{
|
||||
CalculateWorldScale(SMRenderer.CurrentWindow);
|
||||
}
|
||||
|
||||
return WorldScale;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The world scale that got calculated.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue