Pong/Scripts/Managers/BasePaddle.cs
Fries 8072cf4961 the enemy can now scale to the resolution.
i made a BasePaddle class so i can put commonly used fields in a base class. this means i made a new plugin called CustomTypes which contains both Base classes.
2023-05-23 21:48:30 -07:00

19 lines
393 B
C#

namespace Pong.Scripts.Managers;
public partial class BasePaddle: RigidBody2D
{
[Export] protected double MoveSpeed;
protected ScalingManager ScalingManager;
protected Vector2? NewPosition;
public override void _EnterTree()
{
ScalingManager = GetNode<ScalingManager>("../ScalingManager");
}
protected void SetNewPosition(Vector2 newPosition)
{
NewPosition = newPosition;
}
}