![]() Gets the position (x,y) of the node in its parent's coordinate system. SetNormalizedPosition (const Vec2 &position) Sets the position (x,y) using values between 0 and 1. SetPositionNormalized (const Vec2 &position) Sets the position (x,y) of the node in its parent's coordinate system. Gets the scale factor of the node, when X and Y have the same scale factor. Returns the scale factor on Z axis of this node. More.Ĭhanges the scale factor on Z axis of this node. Returns the scale factor on Y axis of this node. Returns the scale factor on X axis of this node. More.ĭefines the order in which the nodes are renderer. ![]() !!! ONLY FOR INTERNAL USE Sets the arrival order when this node has a same ZOrder with other children. LocalZOrder is the 'key' used to sort the node relative to its siblings. SetLocalZOrder (std::int32_t localZOrder) SetCameraMask (unsigned short mask, bool appl圜hildren=true) Get & set camera mask, the node is visible by the camera whose camera flag & node's camera mask is true Get the callback of event ExitTransitionDidStart. GetonExitTransitionDidStartCallback () const SetonExitTransitionDidStartCallback ( local callback) SetonExitTransitionDidStartCallback ( var callback) Set the callback of event ExitTransitionDidStart. SetonExitTransitionDidStartCallback (const std::function &callback) Get the callback of event EnterTransitionDidFinish. ![]() GetonEnterTransitionDidFinishCallback () const SetonEnterTransitionDidFinishCallback ( local callback) SetonEnterTransitionDidFinishCallback ( var callback) Set the callback of event EnterTransitionDidFinish. SetonEnterTransitionDidFinishCallback (const std::function &callback) SetOnExitCallback (const std::function &callback) SetOnEnterCallback (const std::function &callback) If node opacity will modify the RGB color value, then you should override this method and return true. When you pass in create method it will added as child to that Menu. Not add MenuItem to Scene or Layer, just pass in create () method of Menu. No need to set position of MenuItem if you've single MenuItem, set Position of his parent (Menu). If you want the opacity affect the color property, then set to true. You can assume Menu as container or parent of different type of MenuItem. If you want node's color affect the children node's color, then set it to true. SetCascadeColorEnabled (bool cascadeColorEnabled) Query whether cascadeColor is enabled or not. UpdateDisplayedColor ( local parentColor) Update node's displayed color with its parent color. UpdateDisplayedColor (const Color3B &parentColor) SetCascadeOpacityEnabled ( local cascadeOpacityEnabled) SetCascadeOpacityEnabled (bool cascadeOpacityEnabled)Ĭhange node's cascadeOpacity property. Whether cascadeOpacity is enabled or not. Update the displayed opacity of node with it's parent opacity. The node diagram would look like so: CCLayer CCSprite. Using this method you effectively only have to change the position of the CCSprite, and all its children will be positioned relative to it. UpdateDisplayedOpacity (GLubyte parentOpacity) However, rather than adding the CCSprite and CCMenu as separate children of the CCLayer, I would suggest to add the CCMenu as a child of the CCSprite. SetEventDispatcher ( EventDispatcher *dispatcher) Returns an AABB (axis-aligned bounding-box) in its parent's coordinate system. Returns the Scene that contains the Node. ![]() Visit ( var renderer, var parentTransform, var parentFlags) Visits this node's children and draw them recursively. Visit (Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags) Override this method to draw your own node. Stops all running actions and schedulers.ĭraw (Renderer *renderer, const Mat4 &transform, uint32_t flags) ScheduleUpdateWithPriorityLua (int handler, int priority) Returns whether or not the node is "running". Inherited by _NodeRGBA, AtlasNode, AttachNode, BaseLight, Camera, ClippingNode, ClippingRectangleNode, DrawNode, TMXLayer, TMXTiledMap, TableViewCell, GLNode, Label, Layer, MenuItem, MotionStreak, MotionStreak3D, NodeGrid, ParallaxNode, ParticleBatchNode, ParticleSystem, ProgressTimer, ProtectedNode, RenderTexture, Scene, Skybox, Sprite, Sprite3D, SpriteBatchNode, Terrain, TMXTiledMap, and GLNode. If setBlendFunc(cc.SRC_ALPHA, cc.ZERO) then the result will in turn.Node is the base element of the Scene Graph.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |