You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.0 KiB
41 lines
1.0 KiB
4 years ago
|
Content-Type: text/x-zim-wiki
|
||
|
Wiki-Format: zim 0.4
|
||
|
Creation-Date: 2020-09-09T22:41:18-07:00
|
||
|
|
||
|
====== paste ======
|
||
|
Created Wednesday 09 September 2020
|
||
|
|
||
|
// If I were to have multiple systems
|
||
|
/*
|
||
|
|
||
|
One for rendering
|
||
|
One for updating
|
||
|
One for eventing
|
||
|
|
||
|
Rendering is easy enough. It needs all the components necessary in order
|
||
|
to generate the vertices. This includes the position, size, and vertex generator
|
||
|
|
||
|
Updating can probably be multiple types, I imagine something that implemented an Updatable
|
||
|
trait could then be used.
|
||
|
|
||
|
So the big problem here is that I have two traits that I want to expose, BUT
|
||
|
I have to put the concrete value in both containers... I don't think this is something
|
||
|
that specs will like since it wants to be the only owner. No use in RefCell'ing it
|
||
|
because that's just stupid
|
||
|
|
||
|
What if I turn this on it's head and really embrace the systems. So for example I could have
|
||
|
the User system. Ooof this is a big question actually...
|
||
|
|
||
|
// Components that want to be updated
|
||
|
Move
|
||
|
|
||
|
// want to be drawn
|
||
|
Drawable
|
||
|
Geom
|
||
|
|
||
|
Notifyable
|
||
|
|
||
|
|
||
|
|
||
|
*/
|