I am new to Godot and I'm trying to understand how I can implement inheritance. I am writing my first game and in the game there will be 20-25 RigidBody2D objects which will have exactly the same behaviours: when clicked (inputevent signal), they play a sound and then disappear (queuefree()). Only difference between them is that they have different sprites (different shapes, i.e. rectangle, circle, square etc.) and different CollisionPolygon2D's. Can you please kindly suggest a way to achieve this? I started with a RigidBody2D, made it a class and inherited from that. But that way, signalling the input_event in the script gets messed up. The scenes inherited from that class gets created with the signal of the original class. Maybe this is a stupid question but as I said I am a newbie just trying to learn the engine.
Thank you in advance