SFML community forums
Bindings - other languages => DotNet => Topic started by: Brikinhos on June 18, 2020, 03:26:02 pm
-
Hi all, I'm porting my project from C++ to C# and I encountered a problem, I have a class Entity that inherits from Drawable and Transformable, but C# doesn't allow multiple inheritance. How can I do that? Thanks in advance.
-
Drawable is an interface while Transformable is a class, so you can derive from the Transformable class and implement the interface. See how it's done for the Sprite class (https://github.com/SFML/SFML.Net/blob/master/src/SFML.Graphics/Sprite.cs#L17).
-
Oh damn! I feel so bad with myself xD, thanks so much!