Home > other >  Cocos about set painting fade out the picture for help
Cocos about set painting fade out the picture for help

Time:09-29

I am not a programmer is art, in the development of an AVG game (the game program part is outsourcing),
In order to save image resources gave set painting expression cutting, is in a complete body layer overlay expression,
Now encountered a problem, painting fade in the picture, because the expression partly superposition is not the same as the picture so transparency leads to goof,
Specific form below this is my online to find a similar problem solution, but is a unity, to specific corresponding to the cocos,
Development outsourcing solution is to let I painted in a set of facial features, I can't accept and suspect they're feeling lazy, I think this is sure to solve from the program, so want to ask you a great god ever solve BBS direction

CodePudding user response:

you put under the character part of the original buckle to overlay, then post on that part of the fade out at the same time not to go?

CodePudding user response:

reference 1st floor from tang's response:
you put under the character part of the original buckle to overlay, then post on the part of the fade out at the same time not to go?

Tried this plan at the beginning, not found, with the example of the unity is a little difference, I find I change this part is the body is transparent, but department of expression also appear white effect, just like overexposed

CodePudding user response:

Can't use ccrendertexture?

CodePudding user response:

Means the render to texture, the character and expression rendering to a first from the screen surface, used to make the surface texture
Do not recommend to dig in addition to the face, sampling is concerned

CodePudding user response:

Hello, cocos2d - x, or 2 d - lua, a setCascadeOpacityEnabled method, this can be set whether the parent and child nodes associated transparent, when set to true, if the parent node (set painting this layer) is transparent, fade in, the child nodes (expression) will also follow to fade in, this find application processing, not difficult

CodePudding user response:

refer to 6th floor qq1090504117 response:
hello, is the cocos2d - x, or 2 d - lua, a setCascadeOpacityEnabled method, it can set the parent and child node is associated with transparent, when set to true, if the parent node (set painting this layer) is transparent, fade in, the child nodes (expression) will also follow to fade in, find the process, it is not difficult to

Well, I'm sorry, wrong, transparency,

CodePudding user response:

refer to 7th floor qq1090504117 response:
Quote: refer to the sixth floor qq1090504117 response:
hello, is the cocos2d - x, or 2 d - lua, a setCascadeOpacityEnabled method, this can be set whether the parent and child nodes associated transparent, when set to true, if the parent node (set painting this layer) is transparent, fade in, the child nodes (expression) will also follow to fade in, this find application processing, it is not hard to

Well, I'm sorry, wrong, transparency,

Opposite your program can draw layer using a mask, will set painting expression and overlap, generated to the expression of painting, after the mask image and expression at the same time, set the transparency or to establish a link between parent-child then set setCascadeOpacityEnabled transparency

CodePudding user response:

refer to the second floor skeleton cat replies:
Quote: refer to 1st floor from tang's response:

you put under the character part of the original buckle to overlay, then post on that part of the fade out at the same time not to go?

Tried this plan at the beginning, not found, with the example of the unity is a little difference, I find I change this part is the body is transparent, but department of expression also appear white effect, like exposure to excessive
facial character - & gt; Added addchild (expression)?

CodePudding user response:

I thought, no one used COCOS2D
  • Related