本文整理汇总了C++中CCSprite::getAnchorPointInPoints方法的典型用法代码示例。如果您正苦于以下问题:C++ CCSprite::getAnchorPointInPoints方法的具体用法?C++ CCSprite::getAnchorPointInPoints怎么用?C++ CCSprite::getAnchorPointInPoints使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCSprite
的用法示例。
在下文中一共展示了CCSprite::getAnchorPointInPoints方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Load
void HSLanRoomListLayer::Load()
{
CCSprite* pBackground = HSCCSprite::create("Image/BEIJING.png");
pBackground->setPosition(HSBase::GetTemplateScreenCentre());
this->addChild(pBackground);
HSTool::SetNodeFilldScreen(pBackground);
HSGlobal::ShaderGlobal()->AddCloud(this);
HSReadUI::ShareReadUI()->ReadUI("Image/RoomListLan.data","Image/",this);
HS_SET_MENU_TARGET("UI_Fanhuianniu", this, HSLanRoomListLayer::Call_Back);
HS_SET_MENU_TARGET("UI_Chuangjianfangjian", this, HSLanRoomListLayer::Call_CreateRoom);
HS_SET_MENU_TARGET("UI_Shuaxin", this, HSLanRoomListLayer::Call_Refresh);
pRefreshMenu = HS_FIND_UI_MENU("UI_Shuaxin");
pRefreshMenu->setVisible(false);
CCSprite* pRadarItem = HS_FIND_UI_PANEL_SPRITE("UI_Leida", "Leidasaomiao");
CCRotateBy* pRotate = CCRotateBy::create(3.f, -360.f);
pRadarItem->runAction(CCRepeatForever::create(pRotate));
Call_PlayRefreshEffect();
//@ 头像 名称
CCSprite* pHeadFrame = HS_FIND_UI_PANEL_SPRITE("UI_Wanjiaxinxi", "Touxiangdikuang");
CCSprite* pNameFrame = HS_FIND_UI_PANEL_SPRITE("UI_Wanjiaxinxi", "Wanjiamingzikuang");
CCSprite* pHead = HSCCSprite::create("Image/6000.png");
pHead->setPosition(pHeadFrame->getAnchorPointInPoints());
pHeadFrame->addChild(pHead);
CCLabelTTF* pName = CCLabelTTF::create(HS_GAME_CACHE_DATA_LAN().name().c_str(),HS_FONT_HuaKang, 25.f,pNameFrame->getContentSize(),kCCTextAlignmentCenter,kCCVerticalTextAlignmentCenter);
pName->setPosition(pNameFrame->getAnchorPointInPoints());
pNameFrame->addChild(pName);
UserBasicInfo* pTarget = HS_MUTABLE_TARGET_TARGET();
pTarget->Clear();
this->schedule(schedule_selector(HSLanRoomListLayer::ListerTargetJoinRoom), 0);
this->schedule(schedule_selector(HSLanRoomListLayer::ListerCreateRoomSuccessful));
this->schedule(schedule_selector(HSLanRoomListLayer::Updata));
this->scheduleOnce(schedule_selector(HSLanRoomListLayer::ListerOnce), 0);
this->schedule(schedule_selector(HSLanRoomListLayer::ListerTargetUserInfo), 0);
this->Call_Refresh();
}
示例2: Load
void HSDailyRewardSystemLayer::Load()
{
CCLayerColor* pLayerColor = CCLayerColor::create(ccc4(0,0,0,200),HSBase::GetTemplateScreenW(),HSBase::GetTemplateScreenH());
HSTool::SetNodeFilldScreen(pLayerColor);
this->addChild(pLayerColor);
HSReadUI::ShareReadUI()->ReadUI("Image/DailyRewardSystem/DailyRewardSystem.data","Image/DailyRewardSystem/",this);
HS_SET_MENU_TARGET("UI_LingQuJiangLi",this,HSDailyRewardSystemLayer::Call_Claimed);
int dayCount = HS_GAME_CACHE()->m_DailyRewardSystemData.dailyrewardlist_size();
for (int i=0;i<dayCount;++i)
{
DailyRewardSystemData_DailyReward dailyReward = HS_GAME_CACHE()->m_DailyRewardSystemData.dailyrewardlist(i);
CCString* UI = CCString::createWithFormat("UI_DengLuJiangLi_day%d",i);
for (int j=0;j<7;++j)
{
if (j != i)
{
CCString* day = CCString::createWithFormat("day%d",j);
CCSprite* s = HS_FIND_UI_PANEL_SPRITE(UI->getCString(),day->getCString());
s->setVisible(false);
}
}
CCSprite* pGoldFrame = HS_FIND_UI_PANEL_SPRITE(UI->getCString(),"Shuzidiandikuang");
CCLabelTTF* pGoldTTF = CCLabelTTF::create(CCString::createWithFormat("%d",dailyReward.gold())->getCString(),"Marker Felt",25.f);
pGoldTTF->setPosition(pGoldFrame->getAnchorPointInPoints());
pGoldFrame->addChild(pGoldTTF);
switch (dailyReward.state())
//switch (DailyRewardSystemData_DailyReward_ClaimedState_ClaimedState_AllowClaimed)
{
case DailyRewardSystemData_DailyReward_ClaimedState_ClaimedState_Unclaimed:
{
//CCSprite* s = HS_FIND_UI_PANEL_SPRITE(UI->getCString(),"riqibiaoji");
//s->setVisible(false);
}
break;
case DailyRewardSystemData_DailyReward_ClaimedState_ClaimedState_Claimed:
{
CCSprite* pBlue = HS_FIND_UI_PANEL_SPRITE(UI->getCString(),"riqidiban0");
pBlue->setVisible(false);
CCSprite* s = HS_FIND_UI_PANEL_SPRITE(UI->getCString(),"riqibiaoji");
s->setVisible(false);
}
break;
case DailyRewardSystemData_DailyReward_ClaimedState_ClaimedState_AllowClaimed:
{
m_AllowClaimedDayID = dailyReward.dayid();
}
break;
}
}
}