示例#1
0
void CPathFindEditDlg::SetActive(bool bShow)
{

	if (bShow)
	{
		if(m_pSceneManipulator)
		{
			Fairy::Action* action = m_pSceneManipulator->_getAction("PathFind");
			m_pSceneManipulator->setActiveAction(action);
			m_pAction = (CPathFindAction *)action;
			AddNewRegion();
		}
	}
	else
	{
		if(m_pAction)
		{
			m_pAction->SetOldHitPointMaterial();
			m_pSceneManipulator->setActiveAction(NULL);
		}
	}

	// 显示隐藏场景
	if(m_pAction)
	{
		m_pAction->HideScene(bShow);

		Fairy::Action* action = m_pSceneManipulator->_getAction("RegionEdit");
		Fairy::CRegionEditAction* pRegionEditAction = ( Fairy::CRegionEditAction*)action;
		pRegionEditAction->HideScene(bShow);

		if(bShow)
		{
			// 根据地形的高度显示区域.
			m_pAction->SetRegionHeight();
		}
	}

}
示例#2
0
// 激活场景
void CGrowPointEditDlg::SetActive(bool bShow)
{

	if(bShow)
    {
		if(m_pSceneManipulator)
		{
			Fairy::Action* action = m_pSceneManipulator->_getAction("GrowPointEdit");
			m_pSceneManipulator->setActiveAction(action);//
				
		}
       
    }
	else
	{
		if(m_pGrowPointEditAction)
		{
			m_pSceneManipulator->setActiveAction(NULL);
		}
	}

	// 显示隐藏场景
	if(m_pGrowPointEditAction)
	{
		m_pGrowPointEditAction->HideScene(bShow);

		Fairy::Action* action = m_pSceneManipulator->_getAction("RegionEdit");
		Fairy::CRegionEditAction* pRegionEditAction = ( Fairy::CRegionEditAction*)action;
		pRegionEditAction->HideScene(bShow);

		if(bShow)
		{
			
		}
	}

}