예제 #1
0
bool ContactManager::onContactBeginPro_Wall(){

    target_pro = node_Pro->getScheduler()->pauseAllTargets();
    MenuManager menuManager;
    
    Node* layer =menuManager.create_Menu(FAIL_LAYER);
    node_else->getParent()->addChild(layer);
    
    MenuManager::move_in(layer);

    return false;
}
예제 #2
0
bool ContactManager::onContactBeginPro_End(){
    
    target_pro = node_Pro->getScheduler()->pauseAllTargets();
    MenuManager menuManager;
    
    Node* layer =menuManager.create_Menu(SUCCESS_LAYER);
    
    getScore();
    strstream ss;
    string score;
    ss<<SCORE_GET;
    ss>>score;
    
    auto text_score=layer->getChildByName<ui::TextBMFont*>("Text_Score");
    text_score->setString(score);

    
    if(GameManager::stepNow==STEP){
        STEP++;
    }

    //此处应该有个算星星的方法
    int stateN = getState();
     strstream ss1;
    string state;
    ss1<<stateN;
    ss1>>state;
    CCLOG("星星:%d",stateN);
    auto text_state=layer->getChildByName<ui::TextBMFont*>("Text_State");
    text_state->setString(state);
    GameVo gVo;
    GameVo gvoG = getGameInfo(GameManager::stepNow);
    
    if(gvoG._score<SCORE_GET){
        gVo.setData(SCORE_GET, 3, getState());
        setGameInfo(gVo,GameManager::stepNow);
    }
    
    updateConstant();
    
    node_else->getParent()->addChild(layer);
    
    MenuManager::move_in(layer);

    
    
    return false;
}
예제 #3
0
bool ContactManager::onContactBeginPro_Jailer(){
    //node_Pro->getScheduler()->setTimeScale(0.0f);
    if(node_else->isVisible()){
        SpriteManager::setStopJailer(node_else->getTag());
        
        SchedulerManager::stopTimeLine(node_else->getTag());
        node_else->setVisible(false);
        target_pro = node_Pro->getScheduler()->pauseAllTargets();
        MenuManager menuManager;
        
        Node* layer =menuManager.create_Menu(FAIL_LAYER);
        node_else->getParent()->addChild(layer);
        
        MenuManager::move_in(layer);
    }
    
    //layer->setVisible(true);

    return false;
}