您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ IsMoving函数代码示例

51自学网 2021-06-01 21:41:52
  C++
这篇教程C++ IsMoving函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中IsMoving函数的典型用法代码示例。如果您正苦于以下问题:C++ IsMoving函数的具体用法?C++ IsMoving怎么用?C++ IsMoving使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了IsMoving函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: return

int CNPC_Bullsquid::RangeAttack1Conditions( float flDot, float flDist ){	if ( IsMoving() && flDist >= 512 )	{		// squid will far too far behind if he stops running to spit at this distance from the enemy.		return ( COND_NONE );	}	if ( flDist > 85 && flDist <= 784 && flDot >= 0.5 && gpGlobals->curtime >= m_flNextSpitTime )	{		if ( GetEnemy() != NULL )		{			if ( fabs( GetAbsOrigin().z - GetEnemy()->GetAbsOrigin().z ) > 256 )			{				// don't try to spit at someone up really high or down really low.				return( COND_NONE );			}		}		if ( IsMoving() )		{			// don't spit again for a long time, resume chasing enemy.			m_flNextSpitTime = gpGlobals->curtime + 5;		}		else		{			// not moving, so spit again pretty soon.			m_flNextSpitTime = gpGlobals->curtime + 0.5;		}		return( COND_CAN_RANGE_ATTACK1 );	}	return( COND_NONE );}
开发者ID:hitmen047,项目名称:TF2HLCoop,代码行数:35,


示例2: CheckRangeAttack1

//=========================================================// CheckRangeAttack1//=========================================================BOOL CBullsquid :: CheckRangeAttack1 ( float flDot, float flDist ){	if ( IsMoving() && flDist >= 512 )	{		// squid will far too far behind if he stops running to spit at this distance from the enemy.		return FALSE;	}	if ( flDist > 64 && flDist <= 784 && flDot >= 0.5 && gpGlobals->time >= m_flNextSpitTime )	{		if ( m_hEnemy != NULL )		{			if ( fabs( pev->origin.z - m_hEnemy->pev->origin.z ) > 256 )			{				// don't try to spit at someone up really high or down really low.				return FALSE;			}		}		if ( IsMoving() )		{			// don't spit again for a long time, resume chasing enemy.			m_flNextSpitTime = gpGlobals->time + 5;		}		else		{			// not moving, so spit again pretty soon.			m_flNextSpitTime = gpGlobals->time + 0.5;		}		return TRUE;	}	return FALSE;}
开发者ID:Xash3DLinux,项目名称:xash3dlinux,代码行数:38,


示例3: IsMoving

// Updatevoid Game_Player::Update() {	bool last_moving = IsMoving();	if (!IsMoving() && !Game_Map::GetInterpreter().IsRunning()		/*move_route_forcing || Game_Temp::message_window_showing*/) {		switch (Input::dir4) {			case 2:				MoveDown();				break;			case 4:				MoveLeft();				break;			case 6:				MoveRight();				break;			case 8:				MoveUp();		}	}	int last_real_x = real_x;	int last_real_y = real_y;	Game_Character::Update();	UpdateScroll(last_real_x, last_real_y);	UpdateNonMoving(last_moving);}
开发者ID:Bonstra,项目名称:EasyRPG-Player,代码行数:30,


示例4: SetSpriteName

void Game_Event::Setup(RPG::EventPage* new_page) {	bool from_null = page == NULL;	page = new_page;	// Free resources if needed	if (interpreter) {		// If the new page is null and the interpreter is running, it should		// carry on executing its command list during this frame		if (page)			interpreter->Clear();		Game_Map::ReserveInterpreterDeletion(interpreter);		interpreter.reset();	}	if (page == NULL) {		tile_id = 0;		SetSpriteName("");		SetSpriteIndex(0);		SetDirection(RPG::EventPage::Direction_down);		//move_type = 0;		trigger = -1;		list.clear();		return;	}	SetSpriteName(page->character_name);	SetSpriteIndex(page->character_index);	tile_id = page->character_name.empty() ? page->character_index : 0;	if (original_pattern != page->character_pattern) {		pattern = page->character_pattern;		original_pattern = pattern;	}	move_type = page->move_type;	SetMoveSpeed(page->move_speed);	SetMoveFrequency(page->move_frequency);	max_stop_count = (GetMoveFrequency() > 7) ? 0 : (int)pow(2.0, 8 - GetMoveFrequency());	original_move_frequency = page->move_frequency;	original_move_route = page->move_route;	SetOriginalMoveRouteIndex(0);	bool last_direction_fixed = IsDirectionFixed() || IsFacingLocked();	animation_type = page->animation_type;	if (from_null || !(last_direction_fixed || IsMoving()) || IsDirectionFixed())		SetSpriteDirection(page->character_direction);	if (!IsMoving())		SetDirection(page->character_direction);	SetOpacity(page->translucent ? 160 : 255);	SetLayer(page->layer);	data.overlap_forbidden = page->overlap_forbidden;	trigger = page->trigger;	list = page->event_commands;	if (trigger == RPG::EventPage::Trigger_parallel) {		interpreter.reset(new Game_Interpreter_Map());	}}
开发者ID:Souigetsu,项目名称:Player,代码行数:60,


示例5: IsMoving

void Game_Player::Update() {	bool last_moving = IsMoving();	if (!IsMoving() && !Game_Map::GetInterpreter().IsRunning() 		&& !IsMoveRouteOverwritten() && !Game_Message::message_waiting) {		switch (Input::dir4) {			case 2:				MoveDown();				break;			case 4:				MoveLeft();				break;			case 6:				MoveRight();				break;			case 8:				MoveUp();		}	}	int last_real_x = real_x;	int last_real_y = real_y;	Game_Character::Update();	UpdateScroll(last_real_x, last_real_y);	UpdateNonMoving(last_moving);}
开发者ID:MarianoGnu,项目名称:Player,代码行数:29,


示例6: TakeDamage

//=========================================================// TakeDamage - overridden for bullsquid so we can keep track// of how much time has passed since it was last injured//=========================================================int CBullsquid :: TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType ){	float flDist;	Vector vecApex;	// if the squid is running, has an enemy, was hurt by the enemy, hasn't been hurt in the last 3 seconds, and isn't too close to the enemy,	// it will swerve. (whew).	if ( m_hEnemy != NULL && IsMoving() && pevAttacker == m_hEnemy->pev && gpGlobals->time - m_flLastHurtTime > 3 )	{		flDist = ( pev->origin - m_hEnemy->pev->origin ).Length2D();		if ( flDist > SQUID_SPRINT_DIST )		{			flDist = ( pev->origin - m_Route[ m_iRouteIndex ].vecLocation ).Length2D();// reusing flDist.			if ( FTriangulate( pev->origin, m_Route[ m_iRouteIndex ].vecLocation, flDist * 0.5, m_hEnemy, &vecApex ) )			{				InsertWaypoint( vecApex, bits_MF_TO_DETOUR | bits_MF_DONT_SIMPLIFY );			}		}	}	if ( !FClassnameIs ( pevAttacker, "monster_headcrab" ) )	{		// don't forget about headcrabs if it was a headcrab that hurt the squid.		m_flLastHurtTime = gpGlobals->time;	}	return CBaseMonster :: TakeDamage ( pevInflictor, pevAttacker, flDamage, bitsDamageType );}
开发者ID:Xash3DLinux,项目名称:xash3dlinux,代码行数:34,


示例7: WriteToPacket

// ------------------------------------------------------------------------------------------------Uint32 ProjectileBase :: WriteToPacket(Uint32 dataWritePos, Uint8 data[]){	Uint32 sendId = Id();	ProjectileType sendType = Type();    Vector2df sendPos = Pos();    Uint32 sendHeadingDeg = HeadingDeg();    float sendSpeed = Speed();    Uint32 sendOwnerPlayerId = OwnerPlayerId();    float sendLife = Life();    Uint32 sendHealth = Health();    bool sendIsMoving = IsMoving();    memcpy(&data[dataWritePos + PACKET_WRITE_PROJECTILE_ID], &sendId, 4);    memcpy(&data[dataWritePos + PACKET_WRITE_PROJECTILE_TYPE], &sendType, 4);    memcpy(&data[dataWritePos + PACKET_WRITE_PROJECTILE_POSX], &sendPos.x, 4);    memcpy(&data[dataWritePos + PACKET_WRITE_PROJECTILE_POSY], &sendPos.y, 4);    memcpy(&data[dataWritePos + PACKET_WRITE_PROJECTILE_HEADING], &sendHeadingDeg, 4);    memcpy(&data[dataWritePos + PACKET_WRITE_PROJECTILE_SPEED], &sendSpeed, 4);    memcpy(&data[dataWritePos + PACKET_WRITE_PROJECTILE_LIFE], &sendLife, 4);    memcpy(&data[dataWritePos + PACKET_WRITE_PROJECTILE_HEALTH], &sendHealth, 4);    memcpy(&data[dataWritePos + PACKET_WRITE_PROJECTILE_PLAYER_ID], &sendOwnerPlayerId, 4);	memcpy(&data[dataWritePos + PACKET_WRITE_PROJECTILE_ISMOVING], &sendIsMoving, 1);    return PACKET_WRITE_PROJECTILE_LENGTH;} // ----------------------------------------------------------------------------------------------
开发者ID:JustinWang123,项目名称:Gravity,代码行数:26,


示例8: if

void SmoothFollowProcess::VUpdate(unsigned int elapsedTime){	float diffX = m_posX - m_pImage->GetPosX();	float diffY = m_posY - m_pImage->GetPosY();		float deltaX = diffX*m_speed*elapsedTime;	float deltaY = diffY*m_speed*elapsedTime;		if(fabs(deltaX) > fabs(diffX))		deltaX = diffX;		if(fabs(deltaY) > fabs(diffY))		deltaY = diffY;		m_pImage->Translate(deltaX, deltaY);		double diffAngle = m_angle - m_pImage->GetAngle();			if(diffAngle < -180)		diffAngle += 360;	else if(diffAngle > 180)		diffAngle -= 360;			double deltaAngle = diffAngle*m_speed*elapsedTime;		if(fabs(deltaAngle) > fabs(diffAngle))		deltaAngle = diffAngle;			m_pImage->SetAngle(m_pImage->GetAngle() + deltaAngle);		if(!IsMoving(0.5f) && m_bEndIfStatic)		Success();}
开发者ID:Polydash,项目名称:Gomez,代码行数:33,


示例9: UpdateMovement

void CEntity::UpdateMovement(Ogre::Real ElapsedTime){	//Also update walk/idle animation?	if( IsMoving() ){		Ogre::Real LenghtLeftToGo = (GetDestination() - GetPosition()).length();		Ogre::Vector3 Movement = GetMovement();		Ogre::Vector3 CorrectedMovement = ( Movement * ElapsedTime );		//Set the right angle for the entity		mNode->lookAt( GetDestination(), Ogre::Node::TS_WORLD );		if( CorrectedMovement.length() < LenghtLeftToGo ){ //Not at destination yet, just move			mNode->translate( CorrectedMovement );		}else{ //Arrived at destination			mNode->setPosition( GetDestination() );			ReachedDestination();			//TODO: If there is a next destination then go there with the frametime left of this movement.			//(Loop till all frametime is used for movement)			//Example: if there are 3 destinations left, and the first 2 will be reached			//in 2 seconds.			//If the user has a slow computer that updates the frame every 2,5 seconds,			//then it should first use x seconds to reach destination one, then check			//for how many seconds left, and use those to go to the next node and so on.		}	}}
开发者ID:alexleclair,项目名称:NNYv3,代码行数:26,


示例10: switch

void CAI_PlayerAlly::RunTask( const Task_t *pTask ){	switch( pTask->iTask )	{	case TASK_TALKER_CLIENT_STARE:	case TASK_TALKER_LOOK_AT_CLIENT:		if ( pTask->iTask == TASK_TALKER_CLIENT_STARE )		{			// Get edict for one player			CBasePlayer *pPlayer = (CBasePlayer *)CBaseEntity::Instance( engine->PEntityOfEntIndex( 1 ) );			Assert( pPlayer );			// fail out if the player looks away or moves away.			if ( ( pPlayer->GetLocalOrigin() - GetLocalOrigin() ).Length2D() > TLK_STARE_DIST )			{				// player moved away.				TaskFail("Player moved away");			}			Vector forward;			AngleVectors( pPlayer->GetLocalAngles(), &forward );			if ( UTIL_DotPoints( pPlayer->GetLocalOrigin(), GetLocalOrigin(), forward ) < m_flFieldOfView )			{				// player looked away				TaskFail("Player looked away");			}		}		if ( gpGlobals->curtime > m_flWaitFinished )		{			TaskComplete();		}		break;	case TASK_TALKER_EYECONTACT:		if (IsMoving() || !GetExpresser()->IsSpeaking() || GetSpeechTarget() == NULL)		{			TaskComplete();		}		break;	case TASK_WAIT_FOR_MOVEMENT:		if (!GetExpresser()->IsSpeaking() || GetSpeechTarget() == NULL)		{			// override so that during walk, a scientist may talk and greet player			FIdleHello();			if (random->RandomInt(0,m_nSpeak * 20) == 0)			{				FIdleSpeak();			}		}		BaseClass::RunTask( pTask );		break;	default:		BaseClass::RunTask( pTask );	}}
开发者ID:RaisingTheDerp,项目名称:raisingthebar,代码行数:60,


示例11: Move

void CObject::Move ( const CVector& vecPosition, const CVector& vecRotation, unsigned long ulTime ){    // Are we already moving?    if ( IsMoving () )    {        // Stop our current movement        StopMoving ();    }    // If it's more than 0 milliseconds    if ( ulTime > 0 )    {        // Setup our move data        m_moveData.vecStartPosition = GetPosition ();        m_moveData.vecStopPosition = vecPosition;        GetRotation ( m_moveData.vecStartRotation );        m_moveData.vecStopRotation = vecRotation;        m_moveData.ulTime = ulTime;        m_moveData.ulTimeStart = GetTime ();        m_moveData.ulTimeStop = m_moveData.ulTimeStart + ulTime;        m_moveData.bActive = true;    }    // If we have a time of 0, move there now    else    {        SetPosition ( vecPosition );        CVector vecTemp;        GetRotation ( vecTemp );        SetRotation ( vecTemp + vecRotation );    }}
开发者ID:50p,项目名称:multitheftauto,代码行数:31,


示例12: StopFollowing

void CSyncCoreObjectMediator::DisbindConnection(){		if( !m_pConn )		return;	if(!IsActive())		StopFollowing();	if(IsMoving())		StopMoving();		m_bDisbindingConn = false;	GetScene()->DelFromMulticast( m_pConn );	m_fDirKnownMaxSpeed = 0;	//cout<<"DisbindConnection DestroyObjForConnection "<<GetGlobalID()<<endl;	DestroyObjForConnection( m_pConn );	m_pConn->SetMediator(NULL);		AddConnBlockCount();	//关联某个连接,必须最后将m_pConn设置为NULL	IntSetConnection(NULL);	(new CCoreObjOnConnectionDisbindedResult(GetGlobalID()))->Add();}
开发者ID:LaoZhongGu,项目名称:RushGame,代码行数:26,


示例13: IsMovable

bool Game_Vehicle::IsMovable() {	if (!IsInUse())		return false;	if (type == Airship && (IsAscending() || IsDescending()))		return false;	return !IsMoving();}
开发者ID:stavrossk,项目名称:Player,代码行数:7,


示例14: if

const CVector& CObject::GetPosition ( void ){    // Are we attached to something?    if ( m_pAttachedTo )    {        m_vecPosition = m_pAttachedTo->GetPosition ();        m_vecPosition += m_vecAttachedPosition;    }    // Are we moving?    else if ( IsMoving () )    {        // Calculate our current Position        unsigned long ulCurrentTime = GetTime ();        // Grab the difference between start and finish        CVector vecJourney = m_moveData.vecStopPosition - m_moveData.vecStartPosition;        // Grab the duration the object takes to move        float fDuration = static_cast < float > ( m_moveData.ulTime );        // Grab the time that has passed since we started moving        float fTimePassed = static_cast < float > ( ulCurrentTime - m_moveData.ulTimeStart );        // How far along our journey should we be?        vecJourney /= fDuration;        vecJourney *= fTimePassed;        // Update our stored position        m_vecPosition = m_moveData.vecStartPosition + vecJourney;    }    // Finally, return it    return m_vecPosition;}
开发者ID:50p,项目名称:multitheftauto,代码行数:33,


示例15: GetAbsOrigin

//-----------------------------------------------------------------------------// Purpose: //-----------------------------------------------------------------------------void CNPC_Monster::PrescheduleThink( void ){	bool bNearEnemy = false;	if ( GetEnemy() != NULL )	{		float flDist = (GetEnemy()->GetAbsOrigin() - GetAbsOrigin()).Length();		if ( flDist < ZOMBIE_ENEMY_BREATHE_DIST )		{			bNearEnemy = true;		}	}	if ( bNearEnemy )	{		if ( !m_bNearEnemy )		{			m_bNearEnemy = true;		}	}	else if ( m_bNearEnemy )	{		m_bNearEnemy = false;	}	BaseClass::PrescheduleThink();	// We're chopped off! And we're moving! Add some blood trail...	if (m_fIsTorso && IsMoving() && (m_flLastBloodTrail < gpGlobals->curtime))	{		m_flLastBloodTrail = gpGlobals->curtime + 1.0f; // We don't want to spam blood all over the place.		trace_t tr;		UTIL_TraceLine((GetAbsOrigin() + Vector(0, 0, 50)), (GetAbsOrigin() + Vector(0, 0, -300)), MASK_ALL, this, COLLISION_GROUP_NONE, &tr);		UTIL_DecalTrace(&tr, "Blood");	}}
开发者ID:BerntA,项目名称:tfo-code,代码行数:38,


示例16: UpdatePosition

void PhysicalObj::UpdatePosition(){  // No ghost allowed here !  if (IsGhost()) {    return;  }  if (m_collides_with_ground) {    // object is not moving    if (!IsMoving()) {      // and has no reason to move      if (!FootsInVacuum()) {        if (!IsInWater()) {          return;        }      } else {        // it should fall !        StartMoving();      }    }  }  // Compute new position.  RunPhysicalEngine();  if (IsGhost()) {    return;  }  // Classical object sometimes sinks in water and sometimes goes out of water!  if (m_collides_with_ground) {    if (IsInWater() && m_alive!=DROWNED && m_alive!=DEAD) Drown();    else if (!IsInWater() && m_alive==DROWNED) GoOutOfWater();  }}
开发者ID:Arnaud474,项目名称:Warmux,代码行数:35,


示例17: IsMoving

void Game_Player::Update() {	bool last_moving = IsMoving() || IsJumping();	if (IsMovable() && !Game_Map::GetInterpreter().IsRunning()) {		switch (Input::dir4) {			case 2:				Move(Down);				break;			case 4:				Move(Left);				break;			case 6:				Move(Right);				break;			case 8:				Move(Up);		}	}	UpdateScroll();	Game_Character::Update();	if (location.aboard)		GetVehicle()->SyncWithPlayer();	UpdateNonMoving(last_moving);}
开发者ID:Uladox,项目名称:Player,代码行数:27,


示例18: Refresh

void DiscoGrenade::Refresh(){  WeaponProjectile::Refresh();#ifdef HAVE_A_REALLY_BIG_CPU  if(IsMoving()) {    Double norme,angle;    GetSpeed(norme,angle);    for (int i = -3; i<4 ; i++)      smoke_engine.AddNow(GetPosition(), 1, particle_MAGIC_STAR, false,                          angle+(i*QUARTER_PI/3.0)+HALF_PI, 2.0);  } else {      smoke_engine.AddNow(GetPosition(), 1, particle_MAGIC_STAR, false,                          ((Double)(GameTime::GetInstance()->Read()%500)-250.0) * PI / 250.0, 3.0);  }#else //  :-P  smoke_engine.AddPeriodic(GetPosition(), particle_MAGIC_STAR, false);#endif //HAVE_A_REALLY_BIG_CPU  int tmp_time = GetMSSinceTimeoutStart();  // Ah ! Ah ! Ah ! Staying Alive, staying alive ...  if (GetTotalTimeout() >= 2 && tmp_time > (1000 * GetTotalTimeout() - 2000) && !have_played_music) {    //JukeBox::GetInstance()->Play("default","weapon/alleluia") ;    have_played_music = true;  }  image->SetRotation_rad(GetSpeedAngle());}
开发者ID:fluxer,项目名称:warmux,代码行数:27,


示例19: Afraid

void CHostageImprov::Afraid(){	char animInto[32];	char animLoop[32];	char animExit[32];	if (IsCrouching())		return;	if (m_animateState.GetPerformance() == HostageAnimateState::Flinching ||		m_animateState.GetPerformance() == HostageAnimateState::Afraid)		return;	if (!IsMoving())	{		m_animateState.Reset();		m_animateState.SetPerformance(HostageAnimateState::Afraid);		int which = RANDOM_LONG(0, 100) % 3 + 1;		Q_sprintf(animInto, "cower_into_%d", which);		Q_sprintf(animLoop, "cower_loop_%d", which);		Q_sprintf(animExit, "cower_exit_%d", which);		m_animateState.AddSequence(this, animInto);		m_animateState.AddSequence(this, animLoop, RANDOM_FLOAT(3, 10));		m_animateState.AddSequence(this, animExit);	}}
开发者ID:Solexid,项目名称:ReGameDLL_CS,代码行数:29,


示例20: UpdatePhysicalStateBit

void CFeature::SetVelocity(const float3& v){	CWorldObject::SetVelocity(v);	UpdatePhysicalStateBit(CSolidObject::PSTATE_BIT_MOVING, v != ZeroVector);	if (IsMoving()) {		featureHandler->SetFeatureUpdateable(this, true);	}}
开发者ID:AMDmi3,项目名称:spring,代码行数:9,


示例21: Refresh

void FootBomb::Refresh(){  WeaponProjectile::Refresh();//  image->SetRotation_rad(GetSpeedAngle());  if (IsMoving()) {#define ROTATIONS_PER_SECOND  4    image->SetRotation_rad((ROTATIONS_PER_SECOND*GetMSSinceTimeoutStart()*2) * PI / 1000 );  }}
开发者ID:fluxer,项目名称:warmux,代码行数:9,


示例22: GetDestinationForCurrentMove

/// Gibt die Position zurück, wo wir uns hinbewegen (selbe Position, wenn Schiff steht)MapPoint noMovable::GetDestinationForCurrentMove() const{    // Bewegt sich das Ding gerade?    if(IsMoving())        // Dann unsere Zielrichtung zur Berechnung verwenden        return MapPoint(gwg->GetNeighbour(pos, curMoveDir));    return pos;}
开发者ID:Ribosom,项目名称:s25client,代码行数:10,


示例23: UpdateJump

void Game_Character::Update() {	if (IsJumping()) {		UpdateJump();		if (IsSpinning())			anime_count++;	} else if (IsMoving()) {		remaining_step -= 1 << (1 + GetMoveSpeed());		if (IsSpinning() || (animation_type != RPG::EventPage::AnimType_fixed_graphic && walk_animation))			anime_count++;	} else {		stop_count++;		if (IsSpinning() || IsContinuous() || pattern != original_pattern)			anime_count++;	}	if (anime_count >= GetSteppingSpeed()) {		if (IsSpinning()) {			SetSpriteDirection((GetSpriteDirection() + 1) % 4);		} else if (!IsContinuous() && IsStopping()) {			pattern = original_pattern;			last_pattern = last_pattern == RPG::EventPage::Frame_left ? RPG::EventPage::Frame_right : RPG::EventPage::Frame_left;		} else {			if (last_pattern == RPG::EventPage::Frame_left) {				if (pattern == RPG::EventPage::Frame_right) {					pattern = RPG::EventPage::Frame_middle;					last_pattern = RPG::EventPage::Frame_right;				} else {					pattern = RPG::EventPage::Frame_right;				}			} else {				if (pattern == RPG::EventPage::Frame_left) {					pattern = RPG::EventPage::Frame_middle;					last_pattern = RPG::EventPage::Frame_left;				} else {					pattern = RPG::EventPage::Frame_left;				}			}		}		anime_count = 0;	}	if (wait_count > 0) {		wait_count -= 1;		return;	}	if (stop_count >= max_stop_count) {		if (IsMoveRouteOverwritten()) {			MoveTypeCustom();		} else {			// Only events			UpdateSelfMovement();		}	}}
开发者ID:FaithFeather,项目名称:Player,代码行数:56,


示例24: switch

void CNPCSimpleTalker::RunTask( const Task_t *pTask ){	switch( pTask->iTask )	{	case TASK_TALKER_WAIT_FOR_SEMAPHORE:		if ( GetExpresser()->SemaphoreIsAvailable( this ) )			TaskComplete();		break;	case TASK_TALKER_CLIENT_STARE:	case TASK_TALKER_LOOK_AT_CLIENT:		if ( pTask->iTask == TASK_TALKER_CLIENT_STARE && AI_IsSinglePlayer() )		{			// Get edict for one player			CBasePlayer *pPlayer = UTIL_GetLocalPlayer();			Assert( pPlayer );			// fail out if the player looks away or moves away.			if ( ( pPlayer->GetAbsOrigin() - GetAbsOrigin() ).Length2D() > TALKER_STARE_DIST )			{				// player moved away.				TaskFail("Player moved away");			}			Vector forward;			AngleVectors( pPlayer->GetLocalAngles(), &forward );			if ( UTIL_DotPoints( pPlayer->GetAbsOrigin(), GetAbsOrigin(), forward ) < m_flFieldOfView )			{				// player looked away				TaskFail("Player looked away");			}		}		if ( IsWaitFinished() )		{			TaskComplete();		}		break;	case TASK_TALKER_EYECONTACT:		if (IsMoving() || !GetExpresser()->IsSpeaking() || GetSpeechTarget() == NULL)		{			TaskComplete();		}		break;	case TASK_WAIT_FOR_MOVEMENT:		FIdleSpeakWhileMoving();		BaseClass::RunTask( pTask );		break;	default:		BaseClass::RunTask( pTask );	}}
开发者ID:Denzeriko,项目名称:hl2-mod,代码行数:56,


示例25: AllowedToBePushed

bool CASW_Alien_Jumper::AllowedToBePushed( void ){	if ( IsMoving() == false 		 && GetNavType() != NAV_JUMP && m_flNextJumpPushTime <= gpGlobals->curtime )	{		return true;	}	return false;}
开发者ID:BenLubar,项目名称:riflemod,代码行数:10,


示例26: StartMovement

void SegmentServo::StartMovement(uint8_t angleDeg, float speedFactor, bool infinite, bool forced){    if (IsMoving() && !forced)        return;    SetTargetAngle(angleDeg);    _speedFactor = speedFactor > 0.0f ? speedFactor : 1.0f;    _moveStatus = MOVE_STATUS_MOVING;    _infiniteMovement = infinite;}
开发者ID:ELsaman,项目名称:hexxy,代码行数:10,


示例27: UpdateJump

void Game_Character::Update() {	if (IsJumping()) {		UpdateJump();		anime_count += (IsSpinning() ? 1.0 : 0);	} else if (IsContinuous() || IsSpinning()) {		UpdateMove();		UpdateStop();	} else {		if (IsMoving()) {			UpdateMove();		} else {			UpdateStop();		}	}	if (anime_count > 36.0/(GetMoveSpeed()+1)) {		if (IsSpinning()) {			SetPrelockDirection((GetPrelockDirection() + 1) % 4);		} else if (!IsContinuous() && IsStopping()) {			pattern = original_pattern;			last_pattern = last_pattern == RPG::EventPage::Frame_left ? RPG::EventPage::Frame_right : RPG::EventPage::Frame_left;		} else {			if (last_pattern == RPG::EventPage::Frame_left) {				if (pattern == RPG::EventPage::Frame_right) {					pattern = RPG::EventPage::Frame_middle;					last_pattern = RPG::EventPage::Frame_right;				} else {					pattern = RPG::EventPage::Frame_right;				}			} else {				if (pattern == RPG::EventPage::Frame_left) {					pattern = RPG::EventPage::Frame_middle;					last_pattern = RPG::EventPage::Frame_left;				} else {					pattern = RPG::EventPage::Frame_left;				}			}		}		anime_count = 0;	}	if (wait_count > 0) {		wait_count -= 1;		return;	}	if (stop_count >= ((GetMoveFrequency() > 7) ? 0 : pow(2.0, 9 - GetMoveFrequency()))) {		if (IsMoveRouteOverwritten()) {			MoveTypeCustom();		} else if (Game_Message::GetContinueEvents() || !Game_Message::message_waiting) {			UpdateSelfMovement();		}	}}
开发者ID:Ancurio,项目名称:Player,代码行数:55,


示例28: GetBoard

void MODULE::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDrawMode,                   const wxPoint& aOffset ){    if( (m_Flags & DO_NOT_DRAW) || (IsMoving()) )        return;    for( D_PAD* pad = m_Pads;  pad;  pad = pad->Next() )    {        if( pad->IsMoving() )            continue;        pad->Draw( aPanel, aDC, aDrawMode, aOffset );    }    BOARD* brd = GetBoard();    // Draws footprint anchor    DrawAncre( aPanel, aDC, aOffset, DIM_ANCRE_MODULE, aDrawMode );    // Draw graphic items    if( brd->IsElementVisible( MOD_REFERENCES_VISIBLE ) )    {        if( !(m_Reference->IsMoving()) )            m_Reference->Draw( aPanel, aDC, aDrawMode, aOffset );    }    if( brd->IsElementVisible( MOD_VALUES_VISIBLE ) )    {        if( !(m_Value->IsMoving()) )            m_Value->Draw( aPanel, aDC, aDrawMode, aOffset );    }    for( BOARD_ITEM* item = m_Drawings;  item;  item = item->Next() )    {        if( item->IsMoving() )            continue;        switch( item->Type() )        {        case PCB_MODULE_TEXT_T:        case PCB_MODULE_EDGE_T:            item->Draw( aPanel, aDC, aDrawMode, aOffset );            break;        default:            break;        }    }    // Enable these line to draw m_BoundaryBox (debug tests purposes only)#if 0    GRRect( aPanel->GetClipBox(), aDC, m_BoundaryBox, 0, BROWN );#endif}
开发者ID:nikgul,项目名称:kicad-source-mirror,代码行数:55,


示例29: GetMoveAnimation

 const CPositionRotationAnimation* CObject::GetMoveAnimation ( ) {     if ( IsMoving () ) //Call IsMoving since it will make sure the anim is stopped if it's finished     {                 return m_pMoveAnimation;     }     else     {         return NULL;     }}
开发者ID:Jusonex,项目名称:mtasa-awesomium,代码行数:11,



注:本文中的IsMoving函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ IsMyAddress函数代码示例
C++ IsMouseEnabled函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。