void plWinAudible::SetSceneNode(plKey newNode) { plKey oldNode = GetSceneNode(); if( oldNode == newNode ) return; if( !oldNode ) Activate(); if( newNode ) { plNodeRefMsg* refMsg = new plNodeRefMsg(newNode, plNodeRefMsg::kOnRequest, -1, plNodeRefMsg::kAudible); hsgResMgr::ResMgr()->AddViaNotify(GetKey(), refMsg, plRefFlags::kPassiveRef); } if( oldNode ) { oldNode->Release(GetKey()); } if( !newNode ) { DeActivate(); } fSceneNode = newNode; }
void Unit::Move(int x, int y){ if(movepoints>0){ X=x; Y=y; } ///movepoints--; if(movepoints<=0) DeActivate(); }
void TBWindow::OnRemove() { DeActivate(); // Active the top most other window if (TBWindow *active_window = GetTopMostOtherWindow(true)) active_window->Activate(); }
bool FLiveEditorManager::Remove( const FString &Name ) { DeActivate( Name ); ActiveBlueprintTemplates.Remove( Name ); GConfig->SetArray(TEXT("LiveEditor"), TEXT("ActiveBlueprintTemplates"), ActiveBlueprintTemplates, GEditorUserSettingsIni); GConfig->Flush(false, GEditorUserSettingsIni); return true; }
plWin32StreamingSound::~plWin32StreamingSound() { /// Call before we delete our dataStream DeActivate(); IUnloadDataBuffer(); delete fDataStream; delete fDeswizzler; }
void Release() { if ( ActivationCtxHandle == INVALID_HANDLE_VALUE ) { return ; } DeActivate(); ReleaseActCtx( ActivationCtxHandle ); ActivationCtxHandle = INVALID_HANDLE_VALUE; }
CSkeleton::ESkeletonStates CSkeleton::Die() { SetWorldVelocity(XMFLOAT3(0.0f, 0.0f, 0.0f)); m_fExitTimer -= DELTA_TIME(); if (m_fExitTimer < 0.0f) { DeActivate(); return SPAWN; } return DEATH; }
plWin32StreamingSound::~plWin32StreamingSound() { /// Call before we delete our dataStream DeActivate(); IUnloadDataBuffer(); delete fDataStream; fDataStream = nil; fSrcFilename[ 0 ] = 0; delete fDeswizzler; }
void CBone::Update() { if( m_bActive ) { m_pvColliders[0]->SetActive( true ); RotateLocalY( m_mWorld, 1.0f ); m_fDespawnTime -= DELTA_TIME(); if( m_fDespawnTime <= 0.0f ) { m_fDespawnTime = DESPAWN_TIME; DeActivate(); } m_cpParticleManager->Update(); } }
void ProjectileNinjaStar::Update() { if(proj_params.timeDelay <= 0) { proj_params.timeActive -= time; if(proj_params.timeActive <= 0) DeActivate(); proj_params.xLoc += (proj_params.xVel * time); proj_params.yLoc += (proj_params.yVel * time); } else { proj_params.timeDelay -= time; } }
void ProjectilePrisonerRock::Update() { if(proj_params.timeDelay <= 0) { proj_params.timeActive -= time; if(proj_params.timeActive <= 0) DeActivate(); proj_params.xLoc += (proj_params.xVel * time); proj_params.yLoc += (proj_params.yVel * time); if(proj_params.xVel < proj_params.MaxXVel) proj_params.xVel+=proj_params.xAcc*time; if(proj_params.yVel < proj_params.MaxYVel) proj_params.yVel+=proj_params.yAcc*time; } else { proj_params.timeDelay -= time; } }
void FLiveEditorManager::FinishBlueprintBinding( UBlueprint &Blueprint ) { if ( Blueprint.GeneratedClass == NULL ) { if(FPlatformMisc::IsDebuggerPresent()) { FPlatformMisc::DebugBreak(); } return; } FString BlueprintName = Blueprint.GeneratedClass->GetPathName(); if ( BlueprintName.RightChop( BlueprintName.Len() - 2 ) == FString( TEXT("_C") ) ) BlueprintName = BlueprintName.LeftChop(2); if ( CheckActive( BlueprintName ) ) { DeActivate( BlueprintName ); Activate( BlueprintName ); } }
void ProjectilePoints::Update() { if(S_FLICKER) { int i = rand()%4; switch(i) { case 0: this->fnt = fnt_yellow; break; case 1: this->fnt = fnt_red; break; case 2: this->fnt = fnt_green; break; case 3: this->fnt = fnt_blue; break; } } /* Initialize Sprite */ if(proj_params.timeDelay <= 0) { proj_params.timeActive -= time; if(proj_params.timeActive <= 0) DeActivate(); proj_params.xLoc += (proj_params.xVel * time); proj_params.yLoc += (proj_params.yVel * time); } else { proj_params.timeDelay -= time; } }
void Unit::Attack(){ if(atkpoints>0) ///atkpoints--; if(atkpoints<=0) DeActivate(); }
Card::Card() { card_class = "basic"; card_text = "default text";//ctor DeActivate(); }
plWin32StaticSound::~plWin32StaticSound() { DeActivate(); IUnloadDataBuffer(); }
plWin32GroupedSound::~plWin32GroupedSound() { DeActivate(); }
void CMinotaur::Update() { if (m_bChargeParticlePlaying) { m_pParticleManager->GetEmitter(m_unParticleEmitters[eChargeParticle])->GetPosition(0) = GetPosition()->x; m_pParticleManager->GetEmitter(m_unParticleEmitters[eChargeParticle])->GetPosition(2) = GetPosition()->z; } m_pParticleManager->Update(); int nNewState = 0; if (m_bIsGrounded) { if (m_fStompTimer > 0.0f) { m_fStompTimer -= DELTA_TIME(); if (m_fStompTimer < 0.0f) m_fStompTimer = 0.0f; } if (m_fSlowTimer > 0.0f) { m_fSlowTimer -= DELTA_TIME(); if (m_fSlowTimer < 0.0f) m_fSlowTimer = 0.0f; } if (m_nCurrState != eDeadState) { AdjustRotation(); } //Run the current State m_pStates[m_nCurrState]->Execute(this); } m_f3Velocity.y += GRAVITY * DELTA_TIME(); if (GetPosition()->y < -900.0f) DeActivate(); if (m_mWorld.m[3][1] < 0.0f) { m_bIsGrounded = false; } // Update the rotation CCapsule* pCapsule = (CCapsule*)m_pvColliders[1]->GetBounds(); XMFLOAT3 f3NewStart = pCapsule->GetStart(); XMFLOAT3 f3NewEnd = pCapsule->GetEnd(); f3NewStart.x = f3NewEnd.x = m_mWorld._41; f3NewStart.z = f3NewEnd.z = m_mWorld._43; pCapsule->SetStart(f3NewStart); pCapsule->SetEnd(f3NewEnd); m_pMinotaurZone->UpdateColliders(GetWorldVelocity()); UpdateColliders(GetWorldVelocity()); // Update states if (m_bIsGrounded) { nNewState = m_pStates[m_nCurrState]->UpdateState(this); } if (nNewState == -1) { DeActivate(); return; } if (nNewState != m_nCurrState) ChangeState(nNewState); #if _DEBUG /*if (m_vPath.size()) { for (size_t i = 0; i < m_vPath.size() - 1; i { XMFLOAT3 thisPos = m_vPath[i]; XMFLOAT3 nextPos = m_vPath[i + 1]; GRAPHICS->DrawLine(thisPos, nextPos, { 100, 100, 0 }); } }*/ XMFLOAT3 start = ((CCapsule*)m_pvColliders[1]->GetBounds())->GetStart(); XMFLOAT3 end = ((CCapsule*)m_pvColliders[1]->GetBounds())->GetEnd(); //GRAPHICS->DrawLine(start, end, { 1, 0, 1 }); DEBUG_UTIL::DrawCapsuleCollider(start, end, 150.0f); #endif SnapPosition(m_cDropShadow->GetTransformMatrix(), m_mWorld); m_cDropShadow->GetTransformMatrix().m[3][1] += 10.0f; if (m_bIsActive == false) m_cDropShadow->GetTransformMatrix().m[3][1] = -20000.0f; }
void Building::Attack(){ if(atkpoints>0) atkpoints--; if(atkpoints<=0) DeActivate(); }