About to make a big refactor to selection
parent
0d4a800456
commit
12bf2ea96d
@ -1,10 +1,22 @@
|
|||||||
Camera handling:
|
Selecting one entity at a time...
|
||||||
* Set all new cameras as "is_active = false" automatically.
|
* Affects both 2d and 3d modes seemingly equally
|
||||||
* Set loading camera as "is_active = true" upon entering loading.
|
* We seem to not be de-selecting something...
|
||||||
* Set menu camera as "is_active = true" upon entering menu, etc.
|
* Does it happen when you play the game fast/slow?
|
||||||
* Maybe this has to do with loading entry/de-entry? It goes away after entering main menu...
|
* Yes
|
||||||
|
* It only seems to happen when we capture a piece.
|
||||||
|
|
||||||
OK new idea:
|
New architecture:
|
||||||
* Have one enum with all states (no split states)
|
* Instead of inserting a "Selected" marker, emit a "Selected" event.
|
||||||
* Assign a state to each camera.
|
* Contextually this acts differently based on:
|
||||||
* On state change, assign the camera with that state.
|
* If no entities are selected, insert the selected marker on that entity.
|
||||||
|
* If an entity is already marked selected, we emit a move event and de-select all entities.
|
||||||
|
* Q: Should we "Select Event" a BoardIndex?
|
||||||
|
* Pros:
|
||||||
|
* Display agnostic.
|
||||||
|
* Easy to keep in sync between displays.
|
||||||
|
* Cons:
|
||||||
|
* Possibly umm... actually I can't think of any.
|
||||||
|
* Emit "Selected" event which includes the BoardIndex selected.
|
||||||
|
* If a piece exists at that index:
|
||||||
|
* If a piece is already selected, emit a "Move" event and de-select the selected piece.
|
||||||
|
* Else mark it as selected in 2d and 3d.
|
||||||
|
|||||||
Loading…
Reference in New Issue