这篇教程C++ EnableUpdate函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中EnableUpdate函数的典型用法代码示例。如果您正苦于以下问题:C++ EnableUpdate函数的具体用法?C++ EnableUpdate怎么用?C++ EnableUpdate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了EnableUpdate函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: NetStartFirevoid CWeapon::NetUpdateFireMode(SEntityUpdateContext& ctx){ // CGunTurret and CVehicleWeapon overide NetAllowUpdate to perform their own checks. if(NetAllowUpdate(true)) { m_netNextShot -= ctx.fFrameTime; if(IsReloading()) return; // reloading, bail if((!m_isFiringStarted) && (m_isFiring || m_shootCounter > 0)) { m_isFiringStarted = true; m_netNextShot = 0.f; NetStartFire(); EnableUpdate(true, eIUS_FireMode); } if(m_fm) { if(m_shootCounter > 0 && m_netNextShot <= 0.0f) { // Aside from the prediction handle, needed for the server, NetShoot/Ex parameters // are no longer used, these will need removing when the client->server RMI's are tided up m_fm->NetShoot(Vec3(0.f, 0.f, 0.f), 0); m_shootCounter--; //if fireRate == 0.0f, set m_netNextShot to 0.0f, otherwise increment by 60.f / fireRate. // fres used to avoid microcoded instructions, fsel to avoid branching - Rich S const float fRawFireRate = m_fm->GetFireRate(); const float fFireRateSelect = -fabsf(fRawFireRate); const float fFireRateForDiv = (float)__fsel(fFireRateSelect, 1.0f, fRawFireRate); const float fNextShot = (float)__fsel(fFireRateSelect, 0.0f, m_netNextShot + (60.f * __fres(fFireRateForDiv))); m_netNextShot = fNextShot; } } if(m_isFiringStarted && !m_isFiring && m_shootCounter <= 0) { m_isFiringStarted = false; NetStopFire(); EnableUpdate(false, eIUS_FireMode); } // this needs to happen here, or NetStopFire interrupts the animation if(m_doMelee && m_melee) { m_melee->NetAttack(); m_doMelee= false; } }}
开发者ID:Kufusonic,项目名称:Work-in-Progress-Sonic-Fangame,代码行数:53,
示例2: UpdateOriginAxes//------------------------------------------------------------------------------// void OnComboBoxChange()//------------------------------------------------------------------------------void BurnThrusterPanel::OnComboBoxChange(wxCommandEvent &event){ if (event.GetEventObject() == coordSysComboBox) { UpdateOriginAxes(); isCoordSysChanged = true; coordSysName = coordSysComboBox->GetStringSelection().c_str(); EnableUpdate(true); } else if (event.GetEventObject() == tankComboBox) { isTankChanged = true; tankName = tankComboBox->GetStringSelection().WX_TO_STD_STRING; if (tankName == "No Fuel Tank Selected") tankName = ""; // remove "No Tank Selected" once tank is selected int pos = tankComboBox->FindString("No Fuel Tank Selected"); if (pos != wxNOT_FOUND) tankComboBox->Delete(pos); EnableUpdate(true); } else if (event.GetEventObject() == axesComboBox) { std::string csName = coordSysComboBox->GetStringSelection().WX_TO_STD_STRING; if (csName == "Local") { std::string axisValue = axesComboBox->GetValue().WX_TO_STD_STRING; if ((axisValue == "MJ2000Eq") || (axisValue == "SpacecraftBody")) { originLabel->Disable(); originComboBox->Disable(); } else { originLabel->Enable(); originComboBox->Enable(); } } } // thrustModelCB will be NULL if the thruster is not Electric else if (event.GetEventObject() == thrustModelCB) { thrustModel = thrustModelCB->GetStringSelection().c_str(); EnableDataForThrustModel(thrustModel); isThrustModelChanged = true; EnableUpdate(true); }}
开发者ID:rockstorm101,项目名称:GMAT,代码行数:54,
示例3: if//------------------------------------------------------------------------------// void OnComboBoxChange(wxCommandEvent& event)//------------------------------------------------------------------------------void GroundTrackPlotPanel::OnComboBoxChange(wxCommandEvent& event){ if (event.GetEventObject() == mSolverIterComboBox) { mHasDataOptionChanged = true; } else if (event.GetEventObject() == mCentralBodyComboBox) { mHasCentralBodyChanged = true; wxString bodyTexture; if (mCentralBodyComboBox->GetValue() == mCentralBody) { bodyTexture = mTextureFile; } else { // Update texture map to corresponding body CelestialBody *body = (CelestialBody*) theGuiInterpreter->GetConfiguredObject(mCentralBodyComboBox->GetValue().c_str()); Integer id = body->GetParameterID("TextureMapFileName"); bodyTexture = body->GetStringParameter(id).c_str(); } #ifdef DEBUG_CENTRAL_BODY MessageInterface::ShowMessage ("OnComboBoxChange(), bodyTexture = '%s'/n", bodyTexture.c_str()); #endif mTextureMapTextCtrl->SetValue(bodyTexture); mTextureMapTextCtrl->SetInsertionPointEnd(); } EnableUpdate(true);}
开发者ID:rockstorm101,项目名称:GMAT,代码行数:34,
示例4: SetActionSuffix//------------------------------------------------------------------------void CFists::Select(bool select){ CWeapon::Select(select); SetActionSuffix(""); if(select) { EnableUpdate(true, eIUS_General); RequestAnimState(eFAS_FIGHT); } else { EnableUpdate(false, eIUS_General); RequestAnimState(eFAS_NOSTATE); }}
开发者ID:AiYong,项目名称:CryGame,代码行数:17,
示例5: assert//------------------------------------------------------------------------void CVehicleWeapon::StartUse(EntityId userId){ if (m_ownerId && userId != m_ownerId) return; if (GetEntity()->GetParent()) { m_pVehicle = gEnv->pGame->GetIGameFramework()->GetIVehicleSystem()->GetVehicle(GetEntity()->GetParent()->GetId()); assert(m_pVehicle && "Using VehicleWeapons on non-vehicles may lead to unexpected behavior."); if (m_pVehicle) { m_pPart = m_pVehicle->GetWeaponParentPart(GetEntityId()); m_pOwnerSeat = m_pVehicle->GetWeaponParentSeat(GetEntityId()); m_pSeatUser = m_pVehicle->GetSeatForPassenger(userId); } } SetOwnerId(userId); Select(true); m_stats.used = true; EnableUpdate(true, eIUS_General); RequireUpdate(eIUS_General); if (OutOfAmmo(false)) Reload(false); UseManualBlending(true); LowerWeapon(false); SendMusicLogicEvent(eMUSICLOGICEVENT_WEAPON_MOUNT);}
开发者ID:kitnet,项目名称:crynegine,代码行数:36,
示例6: EnableUpdate//------------------------------------------------------------------------------// void SaveData()//------------------------------------------------------------------------------void TargetPanel::SaveData(){ try { std::string solverName = mSolverComboBox->GetValue().WX_TO_STD_STRING; std::string solverMode = mSolverModeComboBox->GetValue().WX_TO_STD_STRING; std::string exitMode = mExitModeComboBox->GetValue().WX_TO_STD_STRING; theCommand->SetStringParameter(theCommand->GetParameterID("Targeter"), solverName); theCommand->SetStringParameter(theCommand->GetParameterID("SolveMode"), solverMode); theCommand->SetStringParameter(theCommand->GetParameterID("ExitMode"), exitMode); if (mProgressWindowCheckBox->IsChecked()) theCommand->SetBooleanParameter("ShowProgressWindow", true); else theCommand->SetBooleanParameter("ShowProgressWindow", false); EnableUpdate(false); } catch (BaseException &e) { MessageInterface::PopupMessage(Gmat::ERROR_, e.GetFullMessage()); }}
开发者ID:rockstorm101,项目名称:GMAT,代码行数:30,
示例7: EnableUpdate//------------------------------------------------------------------------------// void OnTextUpdate(wxCommandEvent& event)//------------------------------------------------------------------------------void ParameterSetupPanel::OnTextUpdate(wxCommandEvent& event){ if (mValueTextCtrl->IsModified()) { mIsValueChanged = true; EnableUpdate(true); }}
开发者ID:rockstorm101,项目名称:GMAT,代码行数:11,
示例8: EnableUpdate//------------------------------------------------------------------------------// void OnTextChange()//------------------------------------------------------------------------------void DragInputsDialog::OnTextChange(wxCommandEvent &event){ if (((wxTextCtrl*)event.GetEventObject())->IsModified()) { EnableUpdate(true); isTextModified = true; }}
开发者ID:rockstorm101,项目名称:GMAT,代码行数:11,
示例9: ReadProperties//------------------------------------------------------------------------void CGunTurret::OnReset(){ if(IScriptTable *pScriptTable = GetEntity()->GetScriptTable()) { SmartScriptTable props; if(pScriptTable->GetValue("Properties", props)) ReadProperties(props); } CItem::OnReset(); Matrix34 tm = GetEntity()->GetSlotLocalTM(eIGS_Aux0,false); tm.SetTranslation(GetSlotHelperPos(eIGS_Aux0,m_radarHelper.c_str(),false)); GetEntity()->SetSlotLocalTM(eIGS_ThirdPerson,tm); if(GetEntity()->IsSlotValid(eIGS_Aux1)) { tm.SetTranslation(GetSlotHelperPos(eIGS_ThirdPerson,m_barrelHelper.c_str(),false)); GetEntity()->SetSlotLocalTM(eIGS_Aux1,tm); } m_targetId = 0; m_destinationId = 0; m_updateTargetTimer = 0.0f; m_abandonTargetTimer = 0.0f; m_goalYaw = 0.0f; m_goalPitch = 0.0f; m_burstTimer = 0.0f; m_pauseTimer = 0.0f; m_searchHint = 0; m_fireHint = 1; m_deviationPos.zero(); m_randoms[eRV_UpdateTarget].Range(m_turretparams.update_target_time * m_fireparams.randomness); m_randoms[eRV_AbandonTarget].Range(m_turretparams.abandon_target_time * m_fireparams.randomness); m_randoms[eRV_BurstTime].Range(m_turretparams.burst_time * m_fireparams.randomness); m_randoms[eRV_BurstPause].Range(m_turretparams.burst_pause * m_fireparams.randomness); m_lightId = AttachLight(eIGS_ThirdPerson, m_lightId, false); StopSound(m_lightSound); m_lightSound = INVALID_SOUNDID; if(m_turretparams.light_fov > 0.f) { m_lightId = AttachLight(eIGS_ThirdPerson, 0, true, m_turretparams.mg_range, m_searchparams.light_color*m_searchparams.light_diffuse_mul, 1.f/m_searchparams.light_diffuse_mul, m_searchparams.light_texture, m_turretparams.light_fov, m_searchparams.light_helper, Vec3(0,0,0), Vec3(-1,0,0), m_searchparams.light_material, m_searchparams.light_hdr_dyn); m_lightSound = PlayAction(g_pItemStrings->use_light); } SetFiringLocator(this); if(m_fm2) m_fm2->Activate(true); EnableUpdate(true, eIUS_General);}
开发者ID:super-nova,项目名称:NovaRepo,代码行数:58,
示例10: EnableUpdate//------------------------------------------------------------------------------// void OnCheckBoxChange(wxCommandEvent& event)//------------------------------------------------------------------------------void GroundTrackPlotPanel::OnCheckBoxChange(wxCommandEvent& event){ if (event.GetEventObject() == mShowPlotCheckBox) { mHasDataOptionChanged = true; } else { } EnableUpdate(true);}
开发者ID:rockstorm101,项目名称:GMAT,代码行数:15,
示例11: UpdateLaservoid CJaw::Update(SEntityUpdateContext& ctx, int slot){ CWeapon::Update(ctx, slot); if (!IsSelected()) return; if(slot == eIUS_Zooming) { UpdateLaser(ctx); } if (slot != eIUS_General) return; UpdatePendingShot(); if (!IsInputFlagSet(CWeapon::eWeaponAction_Zoom) && IsInputFlagSet(CWeapon::eWeaponAction_Fire) && !IsZoomingIn()) AutoZoomOut(); if (m_controllingRocket && !IsZoomed() && !m_zoomTriggerDown) DoAutoDrop(); if (m_autoDropping) { m_autoDropPendingTimer += ctx.fFrameTime; if (CanAutoDrop()) { m_autoDropping = false; DoAutoDrop(); } } if (m_dropped) { m_dropTime += ctx.fFrameTime; if (m_dropTime > g_hideTimeAfterDrop) { if(gEnv->bServer) { if(gEnv->IsEditor()) Hide(true); else gEnv->pEntitySystem->RemoveEntity(GetEntity()->GetId()); } EnableUpdate(false); } else { RequireUpdate(); } }}
开发者ID:amrhead,项目名称:eaascode,代码行数:53,
示例12: EnableUpdate//------------------------------------------------------------------------------void CelestialBodyPanel::SaveData(){ #if DEBUG_CELESBODY_SAVE MessageInterface::ShowMessage("in CBPanel, origBody = %p, theBody = %p/n", origCelestialBody, theCelestialBody); #endif canClose = true; if (properties->IsDataChanged()) { properties->SaveData(); canClose = canClose && properties->CanClosePanel(); } if (orbit->IsDataChanged()) { orbit->SaveData(); canClose = canClose && orbit->CanClosePanel(); } if (orientation->IsDataChanged()) { orientation->SaveData(); canClose = canClose && orientation->CanClosePanel(); } if (visualization->IsDataChanged()) { visualization->SaveData(); canClose = canClose && visualization->CanClosePanel(); } if (!canClose) // why do this???? spacecraft panel did this .... { EnableUpdate(true); return; } // copy the current info into origCelestialBody origCelestialBody->Copy(theCelestialBody); EnableUpdate(false);}
开发者ID:rockstorm101,项目名称:GMAT,代码行数:41,
示例13: dialog//------------------------------------------------------------------------------// void OnBrowse()//------------------------------------------------------------------------------void DragInputsDialog::OnBrowse(wxCommandEvent &event){ wxFileDialog dialog(this, _T("Choose a file"), _T(""), _T(""), _T("*.*")); if (dialog.ShowModal() == wxID_OK) { wxString filename; filename = dialog.GetPath().c_str(); } EnableUpdate(true);}
开发者ID:rockstorm101,项目名称:GMAT,代码行数:16,
示例14: IMPLEMENT_RMIIMPLEMENT_RMI(CHeavyMountedWeapon, ClDropped){ if(!m_rippedOff) { SetUnMountedConfiguration(); UnlinkMountedGun(); FinishRipOff(); EnableUpdate(false); BaseClass::Drop(5.0f); } return true;}
开发者ID:Xydrel,项目名称:Infected,代码行数:13,
示例15: GetEntity//------------------------------------------------------------------------void CItem::OnRepaired(){ for (int i=0; i<eIGS_Last; i++) { ICharacterInstance *pCharacter = GetEntity()->GetCharacter(i); if (pCharacter) pCharacter->SetAnimationSpeed(1.0f); } DestroyedGeometry(false); EnableUpdate(true);}
开发者ID:jjiezheng,项目名称:oohh,代码行数:14,
注:本文中的EnableUpdate函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ EnableWindow函数代码示例 C++ EnableToolTips函数代码示例 |