This is how it looks in chrome and mozilla I am using cocos2dx-3.10 I have used this code var TestLayer = cc.LayerColor.extend({ ctor: function () { this._super(cc.color(255, 255, 255)); var lineUp = new cc.DrawNode();...
I am trying to save a high score integer to the user's Android system, so that it can persist throughout all game-play experience. I have read that using Cocos2D-X one can use NSUserDefaults but this doesn't seem to be available in the Cocos...
Context: I'm creating a Cocos2d-JS Game. I have already created the Project and am in development phase. I can run cocos run -p web or cocos run -p web --source-map from the project directory in the Console. These commands work and allow me to r...
How can I connect to a nodejs socket.io server from a cocos2djs game? I've google all the way to no avail. I tried this but it does not work: socket = io.connect('http://192.168.254.102:7714'); if ( socket === undefined ) { cc.log(...
I wrote a game with Phaser engine but sadly i didn't get any good performance even with cocoonjs. I tried to optimize it but i don't think i can optimize enough. So i'm trying to switch to cocos2d-js. I tried some examples with cocos2d...
I'm trying to load a json file exported from cocosstudio v2.3.2 var myScene = ccs.sceneReader.createNodeWithSceneFile('res/Scene.json'); I got this code from sample-cocos2d-js-scene-gui-master The problem is, i get this error: Can'...
I am researching how to use swipe gestures in cocos2d-js and found that in cocos2d UISwipeGestureRecognizer is used. But I couldn't find it for cocos2d-js. Gestures in cocos2d And also for cocos2d-x in github: CCGestureRecognizer For cocos2d-...
We are getting a crash whenever user changes device language & if game is in background. we are using cocos2dJs3.17.1 to build our games. It seems it is framework issue because to test this scenario we created new blank project & tried the sa...
I'm trying to extend the cc.LabelTTF class in cocos2d-js. I'm having problems with the following code: var FlowingText = cc.LabelTTF.extend({ update : function(dt) { console.log("update. dt:"+dt); } }); I'm exp...
I'm trying to create a chess board, and place it in the middle of the screen, so far i cannot get it to be directly in the center. i don't want to hard code the position to the screen because i'm going to be dealing with different screen...
©2020 All rights reserved.