Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
1
Help us understand the problem. What is going on with this article?

More than 5 years have passed since last update.

@mash76

cocos2dx - jsbindings/html5 でjsonでプロパティをまとめて設定

spriteを作る例。以下のattr命令で。

hoge.js
this.sprite = cc.Sprite.create(res.HelloWorld_png);
this.sprite.attr({
    x: size.width / 2,
    y: size.height / 2,
    scale: 0.5,
    rotation: 180
});
this.addChild(this.sprite, 0);

参考
http://www.cocos2d-x.org/news/192

注意
c++とluaの「cocos-2dx 3.0 rc」といっしょに出た「Cocos2d-JS v3.0 alpha」からです。
多分js版だけです。

1
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
1
Help us understand the problem. What is going on with this article?