owen Posted August 13, 2014 Share Posted August 13, 2014 Hi OK this is an extremely easy question I'm sure but I've not been able to find an obvious answer. I'm developing a basic scrolling platform game and I am displaying score at the top of the screen. Obviously I want the score to remain fixed in its location but instead it's scrolling off screen with the landscape. So I'm missing some accepted/standard way of doing it I think. See example here: http://www.owensouthwood.com/mrgoggles What is the best way of getting text to display and remain on screen in a scrolling game? Thanks. Owen Link to comment Share on other sites More sharing options...
alex_h Posted August 13, 2014 Share Posted August 13, 2014 In your game scene root you make two layers, one for game content, and in front of that another for ui content.Scroll the game content layer only.[Edit] sorry didn't notice that this was a phaser-specific topic! The above approach is the most basic way to achieve your goal if you are building things from scratch. [Edit] lewster32 1 Link to comment Share on other sites More sharing options...
lewster32 Posted August 13, 2014 Share Posted August 13, 2014 Sprites and other display objects have a fixedToCamera property which if true, will stop them moving when the camera does. owen and kctang 2 Link to comment Share on other sites More sharing options...
owen Posted August 13, 2014 Author Share Posted August 13, 2014 Perfect - thank you. Link to comment Share on other sites More sharing options...
Recommended Posts