Questions tagged [cocossharp]

.Net cross platform library for 2D games using C# and F#. It is a .NET port of the popular Cocos2D engine.

76 questions
0
votes
1 answer

Download files from google drive to Xamarin Android Player

Working on a Cocossharp application under Xamarin, I test it in Xamarin Android Player. It works but I need to upload json files from Emulator File System to my application. I did not find solution to upload files from the pc to the emulated device…
0
votes
0 answers

Why XDocument can't find my file?

It's my first question on the forum so don't be too rude please ;) I used to find answers to my question here but now i'm can't resolve my problem... I'm currently trying to work with XML files through XDocument in a CocosSharp project. I'm trying…
0
votes
1 answer

Playing video alongside CCGameView

I have a FrameLayout with a TextView, ImageView, CCGameView and a VideoView. In the game view I have a simple sprite and label. I have one video playing in the VideoView and one Image in the ImageView. When the application first starts the image and…
Omar Rodriguez
  • 429
  • 5
  • 13
0
votes
0 answers

CocosSharp trying to make 2D game, addChild not working as planned

I'm trying to make a simple game where there's a zombie horde coming from the top of the screen to the bottom. I want that a new zombie appears every 5 seconds, and it does, but every time a new zombie appears the previous one stops moving and the…
0
votes
2 answers

"Type or namespace Box2D could not be found" on Android (Xamarin/CocosSharp)

Im building a simple game with Xamarin/Cocossharp in a Shared Project. I added some physics with Box2D and everything works well on WP8.1. I import Box2D and i access to the methods and class provided without problem on Windows Phone, but when i…
Geo
  • 31
  • 6
0
votes
2 answers

How to add image in background in cclayer or ccScene from cocossharp?

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
Nicolas
  • 41
  • 1
  • 3
0
votes
1 answer

CocosSharp Accelerometer Axes

Ok so i have to create a game for a competiton but i encountered the following problem: I have to get the x ,y ,z Axes of a Acceleromter.I use xamarin and i create a CocosSharp game.i manage to get them in MainActivity but i have to get them in…
Gagiu Filip
  • 188
  • 1
  • 10
0
votes
1 answer

How can I achieve a scratchcard effect?

I want to achieve a scratchcard effect like the one in the video below. But it seems quite hard to me (I'm a newbie when it comes to 2D graphics), and I would greatly appreciate a little help, if you have some snippets that could set alpha of the…
user509981
0
votes
0 answers

CocosSharp - Empty project debug error

I try to run empty CocosSharp project in XamarinStudio (http://screencast.com/t/gW9acuyx7), but i get some errors. References (http://screencast.com/t/yRgHcsUijgPk) Can anyone give me advice on why it doesn't work anymore?
Anewil
  • 119
  • 1
  • 14
0
votes
1 answer

Changing CCSprite position leads to disappearing from screen

Faced strange behaviour of CCSprite positioning on a screen. Scenario is simple: change sprite position on touch (dragging item on a screen). private void HandleInput(List arg1, CCEvent arg2) { base.Position =…
Anatolii Gabuza
  • 6,184
  • 2
  • 36
  • 54
0
votes
2 answers

Cocossharp CCFadeOut not working

I use cocossharp. I want to add fade in/out transition when replacing scene. The fade in for the second scene works fine, but the current scene's fade out is not working. My code for transition at GameStartScene.cs is: gameStartLayer.RunAction (new…
Coroner_Rex
  • 323
  • 4
  • 17
0
votes
3 answers

Assign different object to a one object in C#

I'm coding a game with cocosharp in C# for iOS. I want to have an object that will store different objects from different classes and through this object I want call public methods from this objects. The problem is that active object can be from…
0
votes
1 answer

How to add text input field in cocos2d.Android cocos sharp?

I am trying to get CCTextFieldTTF to work in cocos sharp with Xamarin for an android application. But can't get hold of this for the life of me. Could not find any documentation on cocos sharp API either. Does anyone know how to use this class to…
javabot
  • 173
  • 10
0
votes
1 answer

How do I add touch event to the CCNode in CocosSharp?

I have a layer: public class MenuItemsLayer : CCLayer { protected override void AddedToScene() { base.AddedToScene(); var quitItem = new CCLabel("QUIT", "fonts/MarkerFelt", 22, CCLabelFormat.SpriteFont); (...) …
Andrzej
  • 848
  • 1
  • 11
  • 26
-1
votes
2 answers

How do you exit an application in CocosSharp?

I am trying to add "Exit Game" functionality in my CocosSharp game (for Windows phone) but I am unable to find any sample code/ guidance online. Any pointers would be welcome. User should be able to quit the game by pressing a button image on the…