cocos2dx 3 Layer

創建一個全屏黑色背景

1:

在createscene中直接使用

auto layer = DrawPrimitivesTest::create();//這裏創建一個全屏黑的的圖層

scene->addChild(layer);


在init()中不需要做任何的處理就可以了;


2:如果需要改變其layer的顏色,則需要使用到layer的派生類layercolor

 //LayerColor* layer1 = LayerColor::create(Color4B(255,255,255,255));

 //this->addChild(layer1);




發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章