Pong/Scripts/Data/Settings.cs
Fries 604d79e654 the paddle can now scale to the resolution
i added a GameArea class which makes it easier to operate on in coordinates bounds with the GameCoordinate struct wrapper which does calculations for me. the GameArea class also has a normalization system which is how the ScalingManager can teleport items in bounds to relatively the same place when resized.

it took quite a while to get the paddle to teleport. looks like im supposed to modify the position inside IntegrateForces instead of PhysicsProcess which is my mistake.
2023-05-23 00:21:54 -07:00

17 lines
376 B
C#

namespace Pong.Scripts.Data;
/// <summary>
/// a structure containing the data of the settings.
/// </summary>
public struct Settings
{
/// <summary>
/// the scale of the game. this can be from 1.0 to 2.0
/// </summary>
public double Scale;
/// <summary>
/// the default values of settings.
/// </summary>
public static Settings Default => new() { Scale = 1.0 };
}