void Model:: update(State const & state) { setState(state); updateKinematics(); updateDynamics(); }
void NounShip::simulate( dword nTick ) { PROFILE_FUNCTION(); // update the ship if ( !isSleeping() && m_bShipEnabled ) { updateShip( nTick ); // update ship systems updateDynamics( nTick ); // update movement, roll, etc.. updateCombat( nTick ); // update out of combat timer } NounBody::simulate( nTick ); }
void Vehicle::updateAction(btCollisionWorld * collisionWorld, btScalar dt) { updateAerodynamics(dt); updateTransmission(dt); engine.update(dt); updateDynamics(dt); tacho_rpm = engine.getRPM() * 0.3 + tacho_rpm * 0.7; body->setCenterOfMassTransform(transform); body->predictIntegratedTransform(dt, transform); body->proceedToTransform(transform); updateWheelTransform(dt); }
toweringinferno::WorldEvents toweringinferno::World::update( const TCOD_key_t& command ) { if (isMovementKey(command.vk) == false && isActionKey(command) == false && isDoorToggleKey(command) == false && isAxeKey(command) == false && command.vk != TCODK_SPACE) { return eEvent_InvalidInput; } if (m_player.isDead()) { return eEvent_PlayerDied; } if ((updateDoors(command) == eAction_Failed && updateSprinklerControl(command) == eAction_Failed && updateHoseRelease(command) == eAction_Failed) || updateAxe(command) == eAction_Failed ) { // the player may have hit it by mistake, ignore it return eEvent_InvalidInput; } if (calculateNewPlayerPos(command.vk, m_player.getPos()) == eAction_Failed) { return eEvent_InvalidInput; } m_player.update(*this); updateDynamics(); return getType(m_player.getPos()) == eStairsDown ? eEvent_NextFloorDown : eEvent_None; }