精灵(Sprite)

C++

// This is how to create a spriteauto mySprite = Sprite::create("mysprite.png");// this is how to change the properties of the spritemySprite->setPosition(Vec2(500, 0));mySprite->setRotation(40);mySprite->setScale(2.0); // sets both the scale of the X and Y axis uniformlymySprite->setAnchorPoint(Vec2(0, 0));

C++

mySprite->setAnchorPoint(Vec2(0, 0));