本文整理汇总了C++中originalTile函数的典型用法代码示例。如果您正苦于以下问题:C++ originalTile函数的具体用法?C++ originalTile怎么用?C++ originalTile使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了originalTile函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: originalTile
void CCJumpTiles3D::update(float time)
{
int i, j;
float sinz = (sinf((float)M_PI * time * m_nJumps * 2) * m_fAmplitude * m_fAmplitudeRate );
float sinz2 = (sinf((float)M_PI * (time * m_nJumps * 2 + 1)) * m_fAmplitude * m_fAmplitudeRate );
for( i = 0; i < m_sGridSize.width; i++ )
{
for( j = 0; j < m_sGridSize.height; j++ )
{
ccQuad3 coords = originalTile(ccp(i, j));
if ( ((i+j) % 2) == 0 )
{
coords.bl.z += sinz;
coords.br.z += sinz;
coords.tl.z += sinz;
coords.tr.z += sinz;
}
else
{
coords.bl.z += sinz2;
coords.br.z += sinz2;
coords.tl.z += sinz2;
coords.tr.z += sinz2;
}
setTile(ccp(i, j), coords);
}
}
}
示例2: CC_UNUSED_PARAM
void CCShakyTiles3D::update(float time)
{
CC_UNUSED_PARAM(time);
int i, j;
for (i = 0; i < m_sGridSize.width; ++i)
{
for (j = 0; j < m_sGridSize.height; ++j)
{
ccQuad3 coords = originalTile(ccp(i, j));
// X
coords.bl.x += ( rand() % (m_nRandrange*2) ) - m_nRandrange;
coords.br.x += ( rand() % (m_nRandrange*2) ) - m_nRandrange;
coords.tl.x += ( rand() % (m_nRandrange*2) ) - m_nRandrange;
coords.tr.x += ( rand() % (m_nRandrange*2) ) - m_nRandrange;
// Y
coords.bl.y += ( rand() % (m_nRandrange*2) ) - m_nRandrange;
coords.br.y += ( rand() % (m_nRandrange*2) ) - m_nRandrange;
coords.tl.y += ( rand() % (m_nRandrange*2) ) - m_nRandrange;
coords.tr.y += ( rand() % (m_nRandrange*2) ) - m_nRandrange;
if (m_bShakeZ)
{
coords.bl.z += ( rand() % (m_nRandrange*2) ) - m_nRandrange;
coords.br.z += ( rand() % (m_nRandrange*2) ) - m_nRandrange;
coords.tl.z += ( rand() % (m_nRandrange*2) ) - m_nRandrange;
coords.tr.z += ( rand() % (m_nRandrange*2) ) - m_nRandrange;
}
setTile(ccp(i, j), coords);
}
}
}
示例3: CC_UNUSED_PARAM
void CCShatteredTiles3D::update(ccTime time)
{
CC_UNUSED_PARAM(time);
int i, j;
if (m_bOnce == false)
{
for (i = 0; i < m_sGridSize.x; ++i)
{
for (j = 0; j < m_sGridSize.y; ++j)
{
ccQuad3 coords = originalTile(ccg(i ,j));
// X
coords.bl.x += ( rand() % (m_nRandrange*2) ) - m_nRandrange;
coords.br.x += ( rand() % (m_nRandrange*2) ) - m_nRandrange;
coords.tl.x += ( rand() % (m_nRandrange*2) ) - m_nRandrange;
coords.tr.x += ( rand() % (m_nRandrange*2) ) - m_nRandrange;
// Y
coords.bl.y += ( rand() % (m_nRandrange*2) ) - m_nRandrange;
coords.br.y += ( rand() % (m_nRandrange*2) ) - m_nRandrange;
coords.tl.y += ( rand() % (m_nRandrange*2) ) - m_nRandrange;
coords.tr.y += ( rand() % (m_nRandrange*2) ) - m_nRandrange;
if (m_bShatterZ)
{
coords.bl.z += ( rand() % (m_nRandrange*2) ) - m_nRandrange;
coords.br.z += ( rand() % (m_nRandrange*2) ) - m_nRandrange;
coords.tl.z += ( rand() % (m_nRandrange*2) ) - m_nRandrange;
coords.tr.z += ( rand() % (m_nRandrange*2) ) - m_nRandrange;
}
setTile(ccg(i, j), coords);
}
}
m_bOnce = true;
}
}
示例4: setTile
void CCTurnOffTiles::turnOnTile(const ccGridSize& pos)
{
setTile(pos, originalTile(pos));
}
示例5: setTile
void CCTurnOffTiles::turnOnTile(const CCPoint& pos)
{
setTile(pos, originalTile(pos));
}