Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Bindings - other languages
»
DotNet
»
C#, How to code an entity Drawable and Transformable?
Print
Pages: [
1
]
Author
Topic: C#, How to code an entity Drawable and Transformable? (Read 8351 times)
0 Members and 1 Guest are viewing this topic.
Brikinhos
Newbie
Posts: 8
C#, How to code an entity Drawable and Transformable?
«
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.
Logged
eXpl0it3r
SFML Team
Hero Member
Posts: 11034
Re: C#, How to code an entity Drawable and Transformable?
«
Reply #1 on:
June 19, 2020, 10:34:38 am »
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
.
Logged
Official FAQ:
https://www.sfml-dev.org/faq.php
Official Discord Server:
https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog:
https://duerrenberger.dev/blog/
Brikinhos
Newbie
Posts: 8
Re: C#, How to code an entity Drawable and Transformable?
«
Reply #2 on:
June 19, 2020, 04:13:40 pm »
Oh damn! I feel so bad with myself xD, thanks so much!
Logged
Print
Pages: [
1
]
SFML community forums
»
Bindings - other languages
»
DotNet
»
C#, How to code an entity Drawable and Transformable?