Creates a sprite by a given sprite frame
Class CCSpritePlus
#include <Geode/binding/CCSpritePlus.hpp>Examples0
Public static methods2
staticCCSpritePlus*createWithSpriteFrame()
frame
staticCCSpritePlus*createWithSpriteFrameName(charconst*frame)
Creates a sprite by a given sprite’s frame name
frame
Public member functions16
virtualvoidsetScaleX(floatscaleX)
Sets X’s scale on itself and it’s followers
scaleX
virtualvoidsetScaleY(floatscaleY)
Sets Y’s scale on itself and it’s followers
scaleY
virtualvoidsetScale(floatscale)
Sets the Scale of itself and it’s followers
scale
virtualvoidsetPosition(cocos2d::CCPointconst&position)
Sets the position where the sprite will be at and it’s followers
position
virtualvoidsetRotation(floatrotation)
Sets the sprite’s given rotation and it’s followers
rotation
virtualvoidsetRotationX(floatrotationX)
Sets the sprite’s given rotation of X and it’s followers
rotationX
virtualvoidsetRotationY(floatrotationY)
Sets the sprite’s given rotation of Y and it’s followers
rotationY
virtualboolinitWithTexture(cocos2d::CCTexture2D*texture)
Initalizes the sprite using a texture
texture
virtualboolinitWithSpriteFrameName(charconst*frameName)
Initalizes the sprite with a frame name
frameName
virtualvoidsetFlipX(boolflipX)
Sets flipX to itself and it’s followers
flipX
virtualvoidsetFlipY(boolflipY)
Sets flipY to itself and it’s followers
flipY
voidaddFollower(cocos2d::CCNode*follower)
Adds a follower to the sprite
follower
voidfollowSprite(CCSpritePlus*sprite)
Attaches a sprite to the sprite. and other way around
you can think of this as attaching 2 lego blocks together and letting
it drag along.
sprite
CCSpritePlus*getFollower()
Obtains the first following sprite if it has a follower on hand
voidremoveFollower(cocos2d::CCNode*sprite)
Removes a specific following sprite from this sprite.
sprite
voidstopFollow()
Stops this child sprite from following it’s given pare *