Simple arrays or maps for storing hex visual states? #2460
andretchen0
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
@andretchen0 Sounds good to me. We'll definitely need those type of effects in the future, there are some open issues, like #1598 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
One thing that I'd often like to do while developing is change the colors of some on-screen hexagons. Currently, this is done through
Hex
, by setting a class on it, then callingupdateStyle
. But that makes effects limited to whatever's offered inHex
– and aHex
is a very busy, and rather fragile place.I think decoupling on-screen visuals from
Hex
would offer more flexibility. We could have any number of "layers" of visual data – outlines, coordinates, path info, effects – and any number of superimposed layers on-screen at any given time.Converting current
Hex
s to their own layers would just require a simple mapping function.Pulling Phaser visuals out of
Hex
would allow it to do one less thing, which would be good.Plus, it would make it much easier to do some neat animated ground effects like:
Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions