From 1a025c275b70b1bb3c285a4b04ccb9f1af2e0ed4 Mon Sep 17 00:00:00 2001 From: Colin McMillen Date: Wed, 14 Jul 2021 11:13:38 -0400 Subject: [PATCH] just use WorldBounds.{Width,Height} instead of {Size.X,Size.Y} --- Shared/ShmupWorld.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Shared/ShmupWorld.cs b/Shared/ShmupWorld.cs index 5997bca..e7d86d3 100644 --- a/Shared/ShmupWorld.cs +++ b/Shared/ShmupWorld.cs @@ -21,9 +21,9 @@ namespace SemiColinGames { Vector2 motion = Vector2.Multiply(input[0].Motion, modelTime * speed); Position = Vector2.Add(Position, motion); Position.X = Math.Max(Position.X, HalfSize.X); - Position.X = Math.Min(Position.X, worldBounds.Size.X - HalfSize.X); + Position.X = Math.Min(Position.X, worldBounds.Width - HalfSize.X); Position.Y = Math.Max(Position.Y, HalfSize.Y); - Position.Y = Math.Min(Position.Y, worldBounds.Size.Y - HalfSize.Y); + Position.Y = Math.Min(Position.Y, worldBounds.Height - HalfSize.Y); // Check whether we need to add new shots. shotCooldown -= modelTime;