Ejemplo n.º 1
0
void ChildView::OnTimer(wxTimerEvent &event)
{
	if(playsimu)
	{
		m_world->simulate(0.1);
		RefreshChild();
		wxLogStatus(wxT("Simulate World"));
	}
	else return;
}
Ejemplo n.º 2
0
void CPaneHierarchy::RefreshChild( IGameObject* parent, HTREEITEM hItem )
{
	HTREEITEM hItemSub = m_wndTreeHierarchy.InsertItem( parent->getName().c_str(), 0, 1, hItem );

	// child situation
	uint32 childcount = parent->getChildCount();
	for(uint32 i=0; i < childcount; ++i)
	{
		if (parent->getChild(i) && parent->getChild(i)->getGameObjectSuperClass() != eGOClass_SYSTEM)
		{

			RefreshChild(parent->getChild(i), hItemSub);
		}
	}
}
Ejemplo n.º 3
0
void CPaneHierarchy::RefreshHierarchy()
{
	m_wndTreeHierarchy.DeleteAllItems();

	uint32 count = gEnv->pGameObjSystem->getGameObjectCount();
	uint32 realcount = 0;
	uint32 fullcount = 0;
	for( uint32 i=0; i < count; ++i)
	{
		IGameObject* go = gEnv->pGameObjSystem->GetGameObjectById(i);
		if (go && go->getParent() == NULL && go->getGameObjectSuperClass() != eGOClass_SYSTEM)
		{
			//HTREEITEM hItem = m_wndTreeHierarchy.InsertItem( go->getName().c_str() );
			RefreshChild(go, NULL);
		}
	}
}