You asked for it and we have delivered! In this prerelease, we have substantially changed the way a user initialises their game with the new
CCGameView class that allows users to embed their game view within a native application.
Additionally, Xamarin.Forms users are also covered with the new custom Forms view,
To get started, we strongly recommend reading more about these design changes here.
From v220.127.116.11-pre1 onwards, two packages will be made available to users —
CocosSharp.Forms, with the latter package required for Xamarin.Forms users.
Please keep in mind that as this is currently a prerelease, your NuGet package manager may not be immediately able to locate these packages. In particular, in Xamarin Studio, make sure to tick the Show pre-release packages option when adding packages, while in Visual Studio's package manager, ensure that you change the dropdown box from Stable only to Include Prerelease.
We have also updated our suite of Xamarin Studio and Visual Studio project templates to reflect the changes in initialisation. Remember, to install these templates for Xamarin Studio and Visual Studio refer to the guides here and here respectively.
Over the next few weeks, we will be updating the CocosSharp samples repository
xamarin_forms branch to incorporate both the new embeddable native and Xamarin.Forms views, as well as modernising the code-base to reflect other API changes and more generally polishing up the quality of these samples.
The design document here covers some of the limitations of using the new
Additionally, for Xamarin.Forms users targeting the Android platform, please ensure that you're compile target is set to API 23 (6.0).
Fixed Content directory: We have fixed the location for where the Content root directory should reside to be in the folder Content. In practice, providing the users with this flexibility to specify the location gained them nothing and, in the worse case, forgetting to set the root directory resulted in a missing content exception being thrown. So just like other platform-specific resource files, there’s a consistent location where content should reside and a user doesn’t have to worry about specifying it during initialisation.
CCSimpleAudioEngine has been marked as obsolete and replaced with CCAudioEngine: Currently,
CCSimpleAudioEngine is under the
CocosDenshion namespace while all other classes reside within
CocosSharp. This resulted in the odd situation where users were required to import this additional namespace to use audio. Hence, we have moved to replace
CCAudioEngine which resides in
CCScene: AddChild has been marked obsolete and replaced with the AddLayer: In an attempt to further differentiate the roles of
CCLayer, we have replaced the CCScene:AddChild(CCNode) method with CCScene:AddLayer(CCLayer) to emphasise that a scene’s sole role is to house game layers. In subsequent releases, we will move to make this type-safe, so that a user is unable to add nodes that aren’t layers to a scene.