COCOS2D-X: scale sprite

后端 未结 3 2019
暗喜
暗喜 2021-01-25 11:16

I want to set scale for a sprite by height of original image. And then the width of that sprite will follow by original ratio of that image. How can i do that. Thank for all you

3条回答
  •  时光说笑
    2021-01-25 11:32

    You can scale by width or height only with: sprite->setScaleX() and sprite->setScaleY()

提交回复
热议问题