本文整理汇总了C++中player::getCharName方法的典型用法代码示例。如果您正苦于以下问题:C++ player::getCharName方法的具体用法?C++ player::getCharName怎么用?C++ player::getCharName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类player
的用法示例。
在下文中一共展示了player::getCharName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initPlayer
void initPlayer()
{
if (mainPlayer.getCharName().compare("Flu") == 0)
{
player_animation_max = 6;
}
player_animation_select = 0;
mainPlayer.setXP(0);
}
示例2: setPlayerSprites
//initialize player - more to come, for now just animations
void setPlayerSprites()
{
if (mainPlayer.getCharName().compare("Flu") == 0)
{
mainPlayer.loadPlayerSprites(6);
mainPlayer.getSprites()[0] = SOIL_load_OGL_texture("Textures/Flu.png", SOIL_LOAD_AUTO, SOIL_CREATE_NEW_ID, SOIL_FLAG_INVERT_Y);
mainPlayer.getSprites()[1] = SOIL_load_OGL_texture("Textures/Fluattack1.png", SOIL_LOAD_AUTO, SOIL_CREATE_NEW_ID, SOIL_FLAG_INVERT_Y);
mainPlayer.getSprites()[2] = SOIL_load_OGL_texture("Textures/Fluattack2.png", SOIL_LOAD_AUTO, SOIL_CREATE_NEW_ID, SOIL_FLAG_INVERT_Y);
mainPlayer.getSprites()[3] = SOIL_load_OGL_texture("Textures/Fluattack3.png", SOIL_LOAD_AUTO, SOIL_CREATE_NEW_ID, SOIL_FLAG_INVERT_Y);
mainPlayer.getSprites()[4] = SOIL_load_OGL_texture("Textures/Fluattack4.png", SOIL_LOAD_AUTO, SOIL_CREATE_NEW_ID, SOIL_FLAG_INVERT_Y);
mainPlayer.getSprites()[5] = SOIL_load_OGL_texture("Textures/Fluattack5.png", SOIL_LOAD_AUTO, SOIL_CREATE_NEW_ID, SOIL_FLAG_INVERT_Y);
}
}