本文整理汇总了C++中AppDelegate::LogAccess方法的典型用法代码示例。如果您正苦于以下问题:C++ AppDelegate::LogAccess方法的具体用法?C++ AppDelegate::LogAccess怎么用?C++ AppDelegate::LogAccess使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AppDelegate
的用法示例。
在下文中一共展示了AppDelegate::LogAccess方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
//.........这里部分代码省略.........
}
return true;
};
for (int col = 0; col < iCols; col++)
{
float x_position = 0.0;
if (col <= iCols / 2)
{
x_position = Director::getInstance()->getVisibleSize().width / 2 - (iCols / 2 - col) * 190 + 80;
}
else
{
x_position = Director::getInstance()->getVisibleSize().width / 2 + (col - iCols / 2) * 190 + 80;
}
for (int row = 0; row < iRows; row++)
{
float y_position = 0.0;
if (row <= iRows / 2)
{
y_position = Director::getInstance()->getVisibleSize().height / 2 + (iRows / 2 - row) * 190 - 80;
}
else
{
y_position = Director::getInstance()->getVisibleSize().height / 2 - (row - iRows / 2) * 190 - 80;
}
auto card1 = Sprite::create("res/memory_game/memory_square.png");
/*
char file[100];
sprintf(file, "%s", sFile[0]);
card1->setDisplayFrame(SpriteFrameCache::sharedSpriteFrameCache()->spriteFrameByName(file));*/
card1->setPosition(Vec2(x_position + 50, y_position));
if (row == 0 && col == 0){
Director::getInstance()->getEventDispatcher()->addEventListenerWithSceneGraphPriority(touchListener1, card1);
}
else{
Director::getInstance()->getEventDispatcher()->addEventListenerWithSceneGraphPriority(touchListener1->clone(), card1);
}
int index = row + col*iRows;
this->addChild(card1, 20 + index, 1001 + unique_array[index]);
log("index=%d,z-index=%d,x=%f,y=%f", index, unique_array[index], x_position, y_position);
spCard.pushBack(card1);
auto card2 = Sprite::create("res/memory_game/kuang.png");
card2->setPosition(Vec2(x_position + 50, y_position));
this->addChild(card2, 100 + index, 1001 + unique_array[index]);
log("index=%d,z-index=%d,x=%f,y=%f", index, unique_array[index], x_position, y_position);
}
}
iFirstCard = -1;
iSecondCard = -1;
app->LogAccess("MemoryMatch");
m_iCurrentGameLevel = app->getCurrentGameLevel();
schedule(schedule_selector(GameLayer::updateLabels), 0.01f);
schedule(schedule_selector(GameLayer::updateTimeLabel), 1.0f);
delete[] array1;
delete[] array2;
delete[] unique_array;
delete[] array4;
//Director::sharedDirector()->getScheduler()->scheduleSelector(SEL_SCHEDULE(&GameLayer::loadingCallBack), this, .5f, false);
//-----------------------------------add animation----------------------------------------------------------
auto mastco = dynamic_cast<Sprite *> (_rootNode->getChildByName("Sprite_10"));
//int mastcoZOrder=-1;
if (mastco)
{
//mastcoZOrder = mastco->getZOrder();
mastco->setVisible(false);
}
ArmatureDataManager::getInstance()->addArmatureFileInfo("res/animations/1.3/1.3.ExportJson");
Armature *armature = Armature::create("1.3");
armature->setAnchorPoint(Vec2(0.5, 0.5));
armature->setRotation(270);
armature -> setPosition(Vec2(150,400));
armature->setVisible(true);
armature->setTag(888);
schedule(schedule_selector(GameLayer::PlayAnimation), 5.0f);
_rootNode->addChild(armature);
nAniFlag = 1;
//-------------------------------------------------------------------------------------
_bTlEnabled = true;
return true;
}
else
{
return false;
}
}