Resource Optimization (#812)

* right foot creep

* look around stay low

* optimize the fan club prefab

use anim layers for the monkeys

* dansa med oss

* klappa era hander

* cossack sandvich

* soldier of dance

add speed halving / doubling functionality to choreographies

* fix selection of starting dance

* asset re-organization

* organize the last of the 1.0 games

* Wall

* floating windows can no longer become larger than the actual screen
This commit is contained in:
minenice55
2024-03-29 22:52:14 -04:00
parent 11a83685e6
commit ecf29616be
7270 changed files with 152839 additions and 39207 deletions

View File

@ -21,14 +21,16 @@ namespace Rellac.Windows
private void Update()
{
// limit window size
float finalMaxWidth = Mathf.Min(maxWidth, Screen.width);
float finalMaxHeight = Mathf.Min(maxHeight, Screen.height);
RectTransform rectTransform = GetComponent<RectTransform>();
if (maxWidth > 0 && rectTransform.rect.width > maxWidth)
if (maxWidth > 0 && rectTransform.rect.width > finalMaxWidth)
{
rectTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, maxWidth);
rectTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, finalMaxWidth);
}
if (maxHeight > 0 && rectTransform.rect.height > maxHeight)
if (maxHeight > 0 && rectTransform.rect.height > finalMaxHeight)
{
rectTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, maxHeight);
rectTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, finalMaxHeight);
}
// keep in bounds of parent