-
How can I interface OOP objects with Svelto.ECS entities? |
Beta Was this translation helpful? Give feedback.
Answered by
sebas77
Oct 21, 2022
Replies: 1 comment
-
Svelto.ECS officially provides the EntityViewComponent and implementors way to be able to wrap an object around an interface. This method is now NOT recommended anymore and I am in the process of changing the miniexamples that still use it. The best way to interface OOP and entities is explained in the article: https://www.sebaslab.com/oop-abstraction-layer-in-a-ecs-centric-application/ and this is a good miniexample to follow: |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
sebas77
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Svelto.ECS officially provides the EntityViewComponent and implementors way to be able to wrap an object around an interface. This method is now NOT recommended anymore and I am in the process of changing the miniexamples that still use it.
The best way to interface OOP and entities is explained in the article:
https://www.sebaslab.com/oop-abstraction-layer-in-a-ecs-centric-application/
and this is a good miniexample to follow:
https://github.com/sebas77/Svelto.MiniExamples/tree/master/Example1-DoofusesMustEat/DOOFUSES_GAMEOBJECTS