我想把一张图中的一课树放到背景上,
资源图自己画的,丑到木朋友
C++代码:
//背景
auto bg = Sprite::create( “bg.png” );
bg->setAnchorPoint ( Vec2::ZERO );
this->addChild ( bg );
//树
auto tree_a = Sprite::create ( “tree-a.png”, Rect ( 200,580,250,400));
tree_a->setPosition ( Vec2 ( 200,580 ));
tree_a->setAnchorPoint ( Vec2::ZERO );
this->addChild ( tree_a);
可是树没有放到背景上这是那错了呢,谢谢大神!
