本文整理汇总了C++中player::getID方法的典型用法代码示例。如果您正苦于以下问题:C++ player::getID方法的具体用法?C++ player::getID怎么用?C++ player::getID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类player
的用法示例。
在下文中一共展示了player::getID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: assign
void mission::assign( player &u )
{
if( player_id == u.getID() ) {
debugmsg( "strange: player is already assigned to mission %d", uid );
return;
}
if( player_id != -1 ) {
debugmsg( "tried to assign mission %d to player, but mission is already assigned to %d", uid, player_id );
return;
}
player_id = u.getID();
u.on_mission_assignment( *this );
if( status == mission_status::yet_to_start ) {
type->start( this );
status = mission_status::in_progress;
}
}
示例2: assign
void mission::assign( player &u )
{
if( player_id == u.getID() ) {
debugmsg( "strange: player is already assigned to mission %d", uid );
return;
}
if( player_id != -1 ) {
debugmsg( "tried to assign mission %d to player, but mission is already assigned to %d", uid,
player_id );
return;
}
player_id = u.getID();
u.on_mission_assignment( *this );
if( status == mission_status::yet_to_start ) {
if( type->goal == MGOAL_KILL_MONSTER_TYPE && monster_type != mtype_id::NULL_ID() ) {
kill_count_to_reach = g->kill_count( monster_type ) + monster_kill_goal;
} else if( type->goal == MGOAL_KILL_MONSTER_SPEC ) {
kill_count_to_reach = g->kill_count( monster_species ) + monster_kill_goal;
}
type->start( this );
status = mission_status::in_progress;
}
}