I'm coding a mobile application using xamarin forms and I want to use cocosSharp. I would like to add a background from a png image to a ccLayer or a ccScene but I found nothing about that. I hope someone has a solution.
Thanks,
Nicolas
I'm coding a mobile application using xamarin forms and I want to use cocosSharp. I would like to add a background from a png image to a ccLayer or a ccScene but I found nothing about that. I hope someone has a solution.
Thanks,
Nicolas
You could add the images to a spritesheet and then call it from there. That will give you a better performance too. Please check this tutorial https://developer.xamarin.com/guides/cross-platform/game_development/cocossharp/ccspritesheet/
You could simply create a CCSprite and add it to your layer. Just make sure the ZOrder is lower than other objects on the layer.
var back = new CCSprite("mybackground");
AddChild(back);