How to exchange data between two layer in cocos2d-x?

I have Layer A with the skill button and Layer B with the plyer sprite,what i need is that,
when i touch the skill button and the plyer will ues the skill.
How can i let the Layer B know that when i touch the button?
Is there anyone can show me with simple demo?

try CCNotificationCenter

小 苏 wrote:

try CCNotificationCenter

I think that isn’t what i want, but anyway, thanks for reply