Fries
604d79e654
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.
20 lines
544 B
C#
20 lines
544 B
C#
namespace Pong.Scripts;
|
|
|
|
public static class Constants
|
|
{
|
|
/// <summary>
|
|
/// a constant representing 1 Meter in pixels.
|
|
/// </summary>
|
|
public const double Meter = 10;
|
|
|
|
/// <summary>
|
|
/// the pixel size of either the vertical or the horizontal size of the walls.
|
|
/// </summary>
|
|
public const long WallSize = 30;
|
|
|
|
/// <summary>
|
|
/// the extents (half of the size) of the pixel size of either the width for the vertical walls,
|
|
/// or the height for the horizontal walls.
|
|
/// </summary>
|
|
public const long WallSizeExtents = WallSize / 2;
|
|
}
|