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(floatfScaleX)
Sets X’s scale on itself and it’s followers
fScaleX
virtualvoidsetScaleY(floatfScaleY)
Sets Y’s scale on itself and it’s followers
fScaleY
virtualvoidsetScale(floatfScale)
Sets the Scale of itself and it’s followers
fScale
virtualvoidsetPosition()
Sets the position where the sprite will be at and it’s followers
pos
virtualvoidsetRotation(floatfRotation)
Sets the sprite’s given rotation and it’s followers
fRotation
virtualvoidsetRotationX(floatfRotationX)
Sets the sprite’s given rotation of X and it’s followers
fRotationX
virtualvoidsetRotationY(floatp0)
Sets the sprite’s given rotation of Y and it’s followers
fRotationY
virtualboolinitWithTexture(cocos2d::CCTexture2D*texture)
Initalizes the sprite using a texture
texture
virtualboolinitWithSpriteFrameName()
Initalizes the sprite with a frame name
frame
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 *