Beispiel #1
0
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;
}
Beispiel #2
0
void Unit::Move(int x, int y){
    if(movepoints>0){
        X=x;
        Y=y;
    }
    ///movepoints--;
    if(movepoints<=0) DeActivate();
}
Beispiel #3
0
void TBWindow::OnRemove()
{
	DeActivate();

	// Active the top most other window
	if (TBWindow *active_window = GetTopMostOtherWindow(true))
		active_window->Activate();
}
Beispiel #4
0
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;
}
Beispiel #6
0
 void Release()
 {
     if ( ActivationCtxHandle == INVALID_HANDLE_VALUE )
     {
         return ;
     }
     DeActivate();
     ReleaseActCtx( ActivationCtxHandle );
     ActivationCtxHandle = INVALID_HANDLE_VALUE;
 }
Beispiel #7
0
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;
}
Beispiel #9
0
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;
	}
}
Beispiel #12
0
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;
	}
}
Beispiel #14
0
void Unit::Attack(){
    if(atkpoints>0) ///atkpoints--;
    if(atkpoints<=0) DeActivate();
}
Beispiel #15
0
Card::Card()
{
 card_class = "basic";
 card_text = "default text";//ctor
 DeActivate();
}
Beispiel #16
0
plWin32StaticSound::~plWin32StaticSound()
{
    DeActivate();
    IUnloadDataBuffer();
}
plWin32GroupedSound::~plWin32GroupedSound()
{
    DeActivate();
}
Beispiel #18
0
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;
}
Beispiel #19
0
void Building::Attack(){
    if(atkpoints>0) atkpoints--;
    if(atkpoints<=0) DeActivate();
}