就是说不管是谁登陆游戏,你的人物信息资料始终在平板电脑的屏幕正下方(位置坐标需要自己设定,我设置定的是0号位()
char LandLordsScene::getUIPosition(char position)
{
char UIposition;
if (position == m_myPosition)
{
UIposition = 0;
}
else if (position == (m_myPosition+1)%3)//就是说,我的当前位置进行+1之后对3求余然后所得的位置始终为0号位。也就是屏幕的正下方
{
UIposition = 1;
}
else
{
UIposition = 2;
}
return UIposition;
}
m_deviation=3-m_myPosition;
for (int i = 0; i < 3; i++)//拿到三个玩家手上的牌
{
for (int j = 0; j < 17; j++)
{
struct LLpoker tempPoker;
pokerarray[i][j].suit = pData[datalength]-'0';
datalength++;
pokerarray[i][j].point = pData[datalength];
datalength++;
tempPoker.suit = pokerarray[i][j].suit;
tempPoker.point = pokerarray[i][j].point;
m_gamePlayerPokerData[(playerarray[i].chair+m_deviation)%3].push_back(tempPoker);
}
this->sortPoker(m_gamePlayerPokerData[(playerarray[i].chair+m_deviation)%3]);
this->addGamePlayerPoker(m_gamePlayerPokerData[(playerarray[i].chair+m_deviation)%3],(playerarray[i].chair+m_deviation)%3);
this->addGamePlayerPokerTow(m_players[(playerarray[i].chair+m_deviation)%3].name,playerarray[(playerarray[i].chair+m_deviation)%3].sex,playerarray[(playerarray[i].chair+m_deviation)%3].score,(playerarray[i].chair+m_deviation)%3);
}