Qooxdoo 로 클레스 만들기.


// 클레스 - 기본상속 (qx.core.Object)

qx.Class.define("projectName.path.fileName" {

statics:{},

construct:function() { /* 생성자 */ this.base(arguments); },

events:{},

properties:{},

members:{},

destruct:function() { /*파괴자*/ }

});


// qx.core.Object 상속

qx.Class.define("projectName.path.fileName" {

extend:qx.core.Object,

statics:{},

construct:function() { /* 생성자 */ this.base(arguments); },

events:{},

properties:{},

members:{},

destruct:function() { /*파괴자*/ }

});


// 싱글톤

qx.Class.define("projectName.path.fileName" {

type:"Singleton",

statics:{},

construct:function() { /* 생성자 */ this.base(arguments); },

events:{},

properties:{},

members:{},

destruct:function() { /*파괴자*/ }

});


// 싱글톤

qx.Class.define("projectName.path.fileName" {

type:"Singleton",

statics:{},

construct:function() { /* 생성자 */ this.base(arguments); },

events:{},

properties:{},

members:{},

destruct:function() { /*파괴자*/ }

});

한글이 출력되지 않는 경우가 여러가지 있지만,


이 글에 해당하는 내용은 기본적으로 한글 폰트가 내장이 안되어 있을 경우 이다.


한글 폰트를 "ProjectPath/resource/font" 를 넣으면 해결된다.


무료 폰트인 나눔고딕 코딩 폰트를 넣자. 



auto label = Label::createWithTTF("슬픈윈드", "fonts/NanumGothicCoding.ttf", 48);

label->setPosition(Point(480,320));

this->addChild(label, 1);


이제 잘 보일 것이다.

'Dev > cocos2d-x' 카테고리의 다른 글

cocos 실행시 에러 language 문제  (0) 2016.07.18
cocos2d-x 좌표계, 앵커포인트  (0) 2015.04.01
cocos2d-x 구조  (0) 2015.04.01
cocos2d-x 기본 설정 및 프로젝트 생성하기 for mac  (0) 2015.03.31

개발 환경 :

Yosemite 10.10.2

Cocos2d-x v3.5


다운로드 및 환경설정

1. cocos2d-x 를 다운받는다.

2. 압축을 적당한 곳에 푼다.

3. terminal "cd path/cocos2d-x/" 이동

4. terminal "python setup.py" 진행후

5. terminal "source ~/.bash_profile"

6. terminal "cocos" 아래 내용처럼 보이는지 확인.

/cocos2d-x/tools/cocos2d-console/bin/cocos.py 1.5 - cocos console: A command line tool for cocos2d-x


Available commands:

run           Compiles & deploy project and then runs it on the target

luacompile    minifies and/or compiles lua files

deploy        Deploy a project to the target

package       Manage package for cocos

compile       Compiles the current project to binary

framework     Manage frameworks for the project

new           Creates a new project

jscompile     minifies and/or compiles js files


Available arguments:

-h, --help Show this help information

-v, --version Show the version of this command tool


Example:

/Users/wind/Documents/cocos2d-x/tools/cocos2d-console/bin/cocos.py new --help

/Users/wind/Documents/cocos2d-x/tools/cocos2d-console/bin/cocos.py run --help


프로젝트 생성

1.

Game Name : TestGame,

Package Name: info.addline.testgame

Project Path: ./project

Language : cpp


을 생성한다고 할때


2. terminal "cocos new TestGame -p info.addline.testgame -l cpp -d ./project"

3. "path/cocos2d-x/project/TestGame" 에 생성된다.



'Dev > cocos2d-x' 카테고리의 다른 글

cocos 실행시 에러 language 문제  (0) 2016.07.18
cocos2d-x 좌표계, 앵커포인트  (0) 2015.04.01
cocos2d-x 구조  (0) 2015.04.01
cocos2d-x 한글이 출력 안될 경우.  (0) 2015.04.01

+ Recent posts