scrollable gameScene

RiaHafnerRiaHafner DEMember ✭✭

Hy guys,

I'd like to have scrollable CocosSharp gameScene in Xamarin Forms.
I have a Contentpage wich is split in two halfes by a grid. Inside the upper Grid is the CocosSharp gameScene. The problem is the following: I want to create a gameScene which is larger than the Screen. I want to enable vertical scrolling(up and down), so that every object can be seen. Right now the objects I draw outside the screen get cut out and aren't visible. My first idea was to put the gameScene into a scrollview and the scrollview into the upper Grid. But unfortunetly that didn't solve my problem. Does anyone have an idea or solution?
Thanks in advance :)

Best Answer

  • RiaHafnerRiaHafner DEMember ✭✭
    edited July 31 Accepted Answer

    so apparently I just had to change the Heightrequest. (gameView.HeightRequest = 900;) and the DesignResolution. (gameView.DesignResolution = new CCSizeI(100,900);) . And then put the gameView into a ScrollView. This enables scrolling up and down :)

Answers

  • RiaHafnerRiaHafner DEMember ✭✭
    edited July 31 Accepted Answer

    so apparently I just had to change the Heightrequest. (gameView.HeightRequest = 900;) and the DesignResolution. (gameView.DesignResolution = new CCSizeI(100,900);) . And then put the gameView into a ScrollView. This enables scrolling up and down :)

Sign In or Register to comment.