Monster Racer Rush
Select between 5 monster racers, upgrade your monster skill and win the competition!
4.23 / 5.00 3,881 ViewsBuild and Base
Build most powerful forces, unleash hordes of monster and control your soldiers!
3.93 / 5.00 4,634 ViewsSo I'm working on a new test game (it's what I do to better grasp new code I'm learning) and I'm working with parallax scrolling with that top down view. I get how it works and how I can control the boundary box around my player.
But what if I wanted stationary stats on the screen. Like the score or the number of lives remaining for the player. How would I do that?
Like would I attach them to the boundary box? Is that even possible? The player? It can't be the stage cuz with parallax scrolling it would just move or disappear as the player walks around.
As you can probably tell I still have a lot to learn but I'm working on it and you guys have always been a great help to me so far.
At 12/6/13 08:40 PM, Hero101 wrote: But what if I wanted stationary stats on the screen. Like the score or the number of lives remaining for the player. How would I do that?
Have (at least) two "layers": a ui layer and a display layer. You would add the player, background, and parallax stuff to the display layer. Then addchild the ui layer on top of the display layer. You probably have (this.)x += 3; so you would change that to display.x += 3; and leave the stage's position alone.
Try to structure your game's Display List somehow.
For example:
Main Timeline (root)
-->gameInterface
-->-->hpBar
-->-->manaBar
-->-->muteIcon
-->gameContainer
-->-->parallax1
-->-->parallax2
-->-->player
-->-->parallax3
-->-->parallax4