大奖提示重叠

void GlobalTip::ShowTip( int tipType, const char* strParam, int numParam )
{
text_.clear();
string scoreStr;
if ( numParam > 0 )
{
scoreStr = ToString( numParam );
}
text_ += preStr;
text_ += strParam;
text_ += midStr;
text_ += scoreStr;
text_ += endStr;


textSize = font->GetTextSize( CharToWchar(text_.c_str()) );


dstPos.x = -(float)textSize.cx;
dstPos.y = srcPos.y;
fontPos = srcPos;


bShow = true;
bEnd = false;

}



void GlobalTipManager::ShowTip( GLOBAL_TIP_TYPE type, const char* strParam, int numParam )
{
srcPos.x = SCREEN_WIDTH;
srcPos.y = 250.0f + 50.0f*ActiveTipList.size();
GlobalTip *tempTip = NULL;
switch( type ) 
{
case G_TIP_HIGHSCORE:
{
tempTip = pGlobalHighScoreTip[nHighScoreTipIndex];
if ( tempTip )
{
tempTip->SetSrcPos( srcPos );
tempTip->ShowTip( type, strParam, numParam );
ActiveTipList.push_back( tempTip );


nHighScoreTipIndex ++;
if ( nHighScoreTipIndex >= GLOBAL_TIP_MAX_SIZE )
{
nHighScoreTipIndex = 0;
}
}
}
break;
case G_TIP_DEFENDSEVER:
{
tempTip = pGlobalDefendSeverTip[nDefendSeverTipIndex];
if ( tempTip )
{
tempTip->SetSrcPos( srcPos );
tempTip->ShowTip( type, strParam, numParam );
ActiveTipList.push_back( tempTip );


nDefendSeverTipIndex ++;
if ( nDefendSeverTipIndex >= GLOBAL_TIP_MAX_SIZE )
{
nDefendSeverTipIndex = 0;
}
}
}
break;
case G_TIP_OTHER:
GAME_LOG_EX("Other Type...");
break;
default:
GAME_LOG_EX("type 异常 type = %d", (int)type);
break;
}
//


}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值