Fries
8072cf4961
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.
19 lines
393 B
C#
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;
|
|
}
|
|
}
|