@NileshShripal wrote:
Hello , I'm working on cocos2dx 3.3 windows phone project.
My ios and android project is working fine but my windows phone project giving me the following error :-
Error 4 error C2227: left of '->setVisible' must point to class/struct/union/generic type F:\Nilesh\PaperBoss\Classes\GameScreen.cpp 209 1 PaperBossComponent
Above error is coming on following line:-
**GameScreen::staticGlass->setVisible(true);**
Above line is written in the following code :-
// trigger when moving touch listenersprite_Up->onTouchMoved = [this](Touch* touch, Event* event){ if(!isInTouchUp) isDragging = true; auto bounds = event->getCurrentTarget()->getBoundingBox(); if (bounds.containsPoint(touch->getLocation())&&!isInTouchUp ) { if(userDefault->getIntegerForKey("Scene")!=1) GameScreen::staticGlass->setVisible(true); glassBreakAniSprite->setSpriteFrame(SpriteFrame::create("t0.png", Rect(0, 0, 110, 226))); } else{ if (isDraggingBegin) {} } };
In my GameScreen.h file I declared cocos2d::Sprite* staticGlass;
please help me why I'm getting this error.
Posts: 3
Participants: 2