您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ Actor函数代码示例

51自学网 2021-06-01 19:40:27
  C++
这篇教程C++ Actor函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中Actor函数的典型用法代码示例。如果您正苦于以下问题:C++ Actor函数的具体用法?C++ Actor怎么用?C++ Actor使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了Actor函数的24个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: update_schedule

void CPolterTele::update_schedule(){	inherited::update_schedule();	if (!m_object->g_Alive() || !Actor() || !Actor()->g_Alive()) return;	if (Actor()->Position().distance_to(m_object->Position()) > m_pmt_distance) return;	switch (m_state) {	case eStartRaiseObjects:			if (m_time + m_time_next < time()) {			if (!tele_raise_objects())				m_state	= eRaisingObjects;						m_time			= time();			m_time_next		= m_pmt_raise_time_to_wait_in_objects / 2 + Random.randI(m_pmt_raise_time_to_wait_in_objects / 2);		}		if (m_state == eStartRaiseObjects) {			if (m_object->CTelekinesis::get_objects_count() >= m_pmt_object_count) {				m_state		= eRaisingObjects;				m_time		= time();			}		}		break;	case eRaisingObjects:		if (m_time + m_pmt_time_to_hold > time()) break;				m_time				= time();		m_time_next		= 0;		m_state			= eFireObjects;	case eFireObjects:					if (m_time + m_time_next < time()) {			tele_fire_objects	();						m_time			= time();			m_time_next	= m_pmt_time_to_wait_in_objects / 2 + Random.randI(m_pmt_time_to_wait_in_objects / 2);		}				if (m_object->CTelekinesis::get_objects_count() == 0) {			m_state		= eWait;			m_time			= time();		}		break;	case eWait:						if (m_time + m_pmt_time_to_wait < time()) {			m_time_next	= 0;			m_state		= eStartRaiseObjects;		}		break;	}}
开发者ID:OLR-xray,项目名称:OLR-3.0,代码行数:52,


示例2: check_start_conditions

bool CControllerPsyHit::check_start_conditions(){	if (is_active())				return false;		if (m_man->is_captured_pure())	return false;		if (Actor()->Cameras().GetCamEffector(eCEControllerPsyHit))										return false;	if (m_object->Position().distance_to(Actor()->Position()) < m_min_tube_dist) 									return false;	return true;}
开发者ID:OLR-xray,项目名称:XRay-NEW,代码行数:13,


示例3: get_actor_ranking

int get_actor_ranking(){	std::sort	(g_all_statistic_humans.begin(),g_all_statistic_humans.end(),GreaterRankPred);	CSE_ALifeTraderAbstract* pActorAbstract = ch_info_get_from_id(Actor()->ID());	SStatData	d;	d.id		= Actor()->ID();	d.trader	= pActorAbstract;	TOP_LIST::iterator it = std::find(g_all_statistic_humans.begin(),g_all_statistic_humans.end(),d);	if(it!=g_all_statistic_humans.end())		return (int)std::distance(g_all_statistic_humans.begin(), it);	else		return		1;}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:14,


示例4: inherited

CPPEffectorControllerAura::CPPEffectorControllerAura(const SPPInfo &ppi, u32 time_to_fade, const ref_sound &snd_left, const ref_sound &snd_right): inherited(ppi){	m_time_to_fade			= time_to_fade;	m_effector_state		= eStateFadeIn;	m_time_state_started	= Device.dwTimeGlobal;	m_snd_left.clone		(snd_left,st_Effect,sg_SourceType);		m_snd_right.clone		(snd_right,st_Effect,sg_SourceType);		m_snd_left.play_at_pos	(Actor(), Fvector().set(-1.f, 0.f, 1.f), sm_Looped | sm_2D);	m_snd_right.play_at_pos	(Actor(), Fvector().set(-1.f, 0.f, 1.f), sm_Looped | sm_2D);}
开发者ID:2asoft,项目名称:xray,代码行数:14,


示例5: NewActor

Actor NewActor( const Property::Map& map ){  BaseHandle handle;  // First find type and create Actor  Property::Value* typeValue = map.Find( "type" );  if ( typeValue )  {    TypeInfo type = TypeRegistry::Get().GetTypeInfo( typeValue->Get< std::string >() );    if ( type )    {      handle = type.CreateInstance();    }  }  if ( !handle )  {    DALI_LOG_ERROR( "Actor type not provided/n" );    return Actor();  }  Actor actor( Actor::DownCast( handle ) );  if ( actor )  {    // Now set the properties, or create children    for ( unsigned int i = 0, mapCount = map.Count(); i < mapCount; ++i )    {      const StringValuePair& pair( map.GetPair( i ) );      const std::string& key( pair.first );      if ( key == "type" )      {        continue;      }      const Property::Value& value( pair.second );      if ( key == "actors" )      {        // Create children        Property::Array actorArray = value.Get< Property::Array >();        for ( Property::Array::SizeType i = 0; i < actorArray.Size(); ++i)        {          actor.Add( NewActor( actorArray[i].Get< Property::Map >() ) );        }      }      else      {        Property::Index index( actor.GetPropertyIndex( key ) );        if ( index != Property::INVALID_INDEX )        {          actor.SetProperty( index, value );        }      }    }  }  return actor;}
开发者ID:tizenorg,项目名称:platform.core.uifw.dali-core,代码行数:60,


示例6: VERIFY

void CUIActorMenu::CheckDistance(){	CGameObject* pActorGO	= smart_cast<CGameObject*>(m_pActorInvOwner);	CGameObject* pPartnerGO	= smart_cast<CGameObject*>(m_pPartnerInvOwner);	CGameObject* pBoxGO		= smart_cast<CGameObject*>(m_pInvBox);	VERIFY(pActorGO && (pPartnerGO || pBoxGO || m_pCar));	if ( pPartnerGO )	{		if ( ( pActorGO->Position().distance_to( pPartnerGO->Position() ) > 3.0f ) &&			!m_pPartnerInvOwner->NeedOsoznanieMode() )		{			GetHolder()->StartStopMenu( this, true ); // hide actor menu		}	}	else if (m_pCar && Actor()->Holder())	{		//nop	}	else //pBoxGO	{		VERIFY( pBoxGO );		if ( pActorGO->Position().distance_to( pBoxGO->Position() ) > 3.0f )		{			GetHolder()->StartStopMenu( this, true ); // hide actor menu		}	}}
开发者ID:Charsi82,项目名称:xray-1.5.10-2015-,代码行数:28,


示例7: Stop

void CActorDeathEffector::Stop(){	RemoveEffector			(Actor(),effActorDeath);	m_death_sound.destroy	();	enable_input			();	show_indicators			();}
开发者ID:zcaliptium,项目名称:xray-16,代码行数:7,


示例8: Actor

void CUITalkWnd::InitTalkDialog(){	m_pActor = Actor();	if (m_pActor && !m_pActor->IsTalking()) return;	m_pOurInvOwner = smart_cast<CInventoryOwner*>(m_pActor);	m_pOthersInvOwner = m_pActor->GetTalkPartner();	m_pOurDialogManager = smart_cast<CPhraseDialogManager*>(m_pOurInvOwner);	m_pOthersDialogManager = smart_cast<CPhraseDialogManager*>(m_pOthersInvOwner);	//имена собеседников	UITalkDialogWnd->UICharacterInfoLeft.InitCharacter		(m_pOurInvOwner->object_id());	UITalkDialogWnd->UICharacterInfoRight.InitCharacter		(m_pOthersInvOwner->object_id());//.	UITalkDialogWnd->UIDialogFrame.UITitleText.SetText		(m_pOthersInvOwner->Name());//.	UITalkDialogWnd->UIOurPhrasesFrame.UITitleText.SetText	(m_pOurInvOwner->Name());		//очистить лог сообщений	UITalkDialogWnd->ClearAll();	InitOthersStartDialog					();	NeedUpdateQuestions						();	Update									();	UITalkDialogWnd->mechanic_mode			= m_pOthersInvOwner->SpecificCharacter().upgrade_mechanic();	UITalkDialogWnd->SetOsoznanieMode		(m_pOthersInvOwner->NeedOsoznanieMode());	UITalkDialogWnd->Show					();	UITalkDialogWnd->UpdateButtonsLayout(b_disable_break, m_pOthersInvOwner->IsTradeEnabled());}
开发者ID:Charsi82,项目名称:xray-1.5.10-2015-,代码行数:30,


示例9: Game

void CChangeLevelWnd::OnCancel(){	Game().StartStopMenu					(this, true);	if(m_b_position_cancel){		Actor()->MoveActor(m_position_cancel, m_angles_cancel);	}}
开发者ID:OLR-xray,项目名称:OLR-3.0,代码行数:7,


示例10: Actor

void CControllerPsyHit::deactivate(){	m_man->release_pure				(this);	m_man->unsubscribe				(this, ControlCom::eventAnimationEnd);	if (m_blocked) {		NET_Packet			P;		Actor()->u_EventGen	(P, GEG_PLAYER_WEAPON_HIDE_STATE, Actor()->ID());		P.w_u32				(INV_STATE_BLOCK_ALL);		P.w_u8				(u8(false));		Actor()->u_EventSend(P);	}	set_sound_state					(eNone);}
开发者ID:OLR-xray,项目名称:XRay-NEW,代码行数:16,


示例11: _min

void CUILogsWnd::PerformWork(){	if(!m_news_in_queue.empty())	{		u32 count = _min(30, m_news_in_queue.size());//.		u32 count = m_news_in_queue.size();		for(u32 i=0; i<count;++i)		{			GAME_NEWS_VECTOR& news_vector = Actor()->game_news_registry->registry().objects();			u32 idx						= m_news_in_queue.back();			m_news_in_queue.pop_back	();			GAME_NEWS_DATA& gn			= news_vector[idx];						AddNewsItem					( gn, NULL );		}	}/*	else	{		s32 cnt = m_items_cache.size()+m_list->GetSize();		if(cnt<1000)		{			for(s32 i=0; i<_min(10,1000-cnt); ++i)				m_items_cache.push_back(CreateItem());		}	}*/}
开发者ID:2asoft,项目名称:xray,代码行数:27,


示例12: switch

void CInventoryBox::OnEvent(NET_Packet& P, u16 type){	inherited::OnEvent	(P, type);	switch (type)	{	case GE_OWNERSHIP_TAKE:		{			u16 id;            P.r_u16(id);			CObject* itm = Level().Objects.net_Find(id);  VERIFY(itm);			m_items.push_back	(id);			itm->H_SetParent	(this);			itm->setVisible		(FALSE);			itm->setEnabled		(FALSE);		}break;	case GE_OWNERSHIP_REJECT:		{			u16 id;            P.r_u16(id);			CObject* itm = Level().Objects.net_Find(id);  VERIFY(itm);			xr_vector<u16>::iterator it;			it = std::find(m_items.begin(),m_items.end(),id); VERIFY(it!=m_items.end());			m_items.erase		(it);			itm->H_SetParent	(NULL,!P.r_eof() && P.r_u8());			if( m_in_use )			{				CGameObject* GO		= smart_cast<CGameObject*>(itm);				Actor()->callback(GameObject::eInvBoxItemTake)( this->lua_game_object(), GO->lua_game_object() );			}		}break;	};}
开发者ID:OLR-xray,项目名称:XRay-NEW,代码行数:34,


示例13: IR_OnKeyboardRelease

void CLevel::IR_OnMouseRelease(int btn){		IR_OnKeyboardRelease(mouse_button_2_key[btn]);	// Callback for scripting (Cribbledirge).	if (g_actor) Actor()->callback(GameObject::eOnMouseRelease)(btn);}
开发者ID:Karlan88,项目名称:xray,代码行数:7,


示例14: ch_info_get_from_id

void CUIStalkersRankingWnd::FillList(){	CUIXml									uiXml;	uiXml.Load								(CONFIG_PATH, UI_PATH,STALKERS_RANKING_XML);	UIList->Clear							();	uiXml.SetLocalRoot						(uiXml.NavigateToNode("stalkers_list",0));	if(g_all_statistic_humans.size())	{		CSE_ALifeTraderAbstract* pActorAbstract = ch_info_get_from_id(Actor()->ID());		int actor_place							= get_actor_ranking();		int sz = _min(g_all_statistic_humans.size(),20);		for(int i=0; i<sz; ++i){			CSE_ALifeTraderAbstract* pT			= (g_all_statistic_humans[i]).trader;			if(pT==pActorAbstract || (i==19&&actor_place>19)  ){				AddActorItem					(&uiXml, actor_place+1, pActorAbstract);			}else{				AddStalkerItem					(&uiXml, i+1, pT);			}		}		UIList->SetSelected						(UIList->GetItem(0) );	}else{		CUIStalkerRankingInfoItem* itm		= xr_new<CUIStalkerRankingInfoItem>(this);		itm->Init							(&uiXml, "no_items", 0);		UIList->AddWindow					(itm, true);	}}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:32,


示例15: todo

void CUIActorInfoWnd::FillPointsDetail(const shared_str& id){	UIDetailList->Clear							();	CUIXml										uiXml;	uiXml.Load									(CONFIG_PATH, UI_PATH,ACTOR_STATISTIC_XML);	uiXml.SetLocalRoot							(uiXml.NavigateToNode("actor_stats_wnd",0));		string512 path;	sprintf_s									(path,"detail_part_%s",id.c_str());		XML_NODE* n									= uiXml.NavigateToNode(path,0);	if(!n)		sprintf_s								(path,"detail_part_def");#pragma todo("implement this")/*	string256									str;	sprintf_s									(str,"st_detail_list_for_%s", id.c_str());	UIInfoHeader->GetTitleStatic()->SetTextST	(str);*/	SStatSectionData&	section				= Actor()->	StatisticMgr().GetSection(id);	vStatDetailData::const_iterator it		= section.data.begin();	vStatDetailData::const_iterator it_e	= section.data.end();	int _cntr = 0;	string64 buff;	for(;it!=it_e;++it,++_cntr)	{		CUIActorStaticticDetail* itm		= xr_new<CUIActorStaticticDetail>();		itm->Init							(&uiXml, path, 0);		sprintf_s							(buff,"%d.",_cntr);		itm->m_text0->SetText				(buff);		itm->m_text1->SetTextST				(*CStringTable().translate((*it).key));		itm->m_text1->AdjustHeightToText	();		if( 0==(*it).str_value.size() )		{			sprintf_s							(buff,"x%d", (*it).int_count);			itm->m_text2->SetTextST				(buff);			sprintf_s							(buff,"%d", (*it).int_points);			itm->m_text3->SetTextST				(buff);		}else		{			itm->m_text2->SetTextST				((*it).str_value.c_str());			itm->m_text3->SetTextST				("");		}		Fvector2 sz							= itm->GetWndSize();		float _height;		_height								= _max(sz.y, itm->m_text1->GetWndPos().y+itm->m_text1->GetWndSize().y+3);		sz.y								= _height;		itm->SetWndSize						(sz);		UIDetailList->AddWindow				(itm, true);	}}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:59,


示例16: return

bool CMonsterEnemyManager::enemy_see_me_now(){	if ( Actor() == enemy ) 	{		return (Actor()->memory().visual().visible_right_now(monster)); 	}	else 	{		CCustomMonster *cm = const_cast<CEntityAlive*>(enemy)->cast_custom_monster();		if ( cm ) 		{			return cm->memory().visual().visible_right_now(monster);		}	}	return false; }
开发者ID:2asoft,项目名称:xray,代码行数:17,


示例17: Actor

CActorDeathEffector::CActorDeathEffector	(CActorCondition* parent, LPCSTR sect)	// -((:m_pParent(parent){	Actor()->SetWeaponHideState(INV_STATE_BLOCK_ALL,true);	hide_indicators			();	AddEffector				(Actor(), effActorDeath, sect);	disable_input			();	LPCSTR snd				= pSettings->r_string(sect, "snd");	m_death_sound.create	(snd,st_Effect,0);	m_death_sound.play_at_pos(0,Fvector().set(0,0,0),sm_2D);	SBaseEffector* pe		= Actor()->Cameras().GetPPEffector((EEffectorPPType)effActorDeath);	pe->m_on_b_remove_callback = SBaseEffector::CB_ON_B_REMOVE(this, &CActorDeathEffector::OnPPEffectorReleased);	m_b_actual				= true;		m_start_health			= m_pParent->health();}
开发者ID:zcaliptium,项目名称:xray-16,代码行数:18,


示例18: VERIFY

void _give_news	(LPCSTR caption, LPCSTR text, LPCSTR texture_name, int delay, int show_time, int type){	GAME_NEWS_DATA				news_data;	news_data.m_type			= (GAME_NEWS_DATA::eNewsType)type;	news_data.news_caption		= caption;	news_data.news_text			= text;	if(show_time!=0)		news_data.show_time		= show_time;// override default	VERIFY(xr_strlen(texture_name)>0);	news_data.texture_name			= texture_name;	if(delay==0)		Actor()->AddGameNews(news_data);	else		Actor()->AddGameNews_deffered(news_data,delay);}
开发者ID:2asoft,项目名称:xray,代码行数:18,


示例19: add_enemy_debug_info

void   add_enemy_debug_info (debug::text_tree& root_s, const CCustomMonster* pThis, const CEntityAlive* pEnemy){	add_debug_info(root_s, pEnemy);	root_s.add_line("I_See_Enemy", pThis->memory().visual().visible_right_now(pEnemy));	bool seen_now = false;	if ( Actor() == pEnemy ) 	{		seen_now = Actor()->memory().visual().visible_right_now(pThis); 	} 	else if ( CCustomMonster* cm = const_cast<CEntityAlive*>(pEnemy)->cast_custom_monster() )	{		seen_now = cm->memory().visual().visible_right_now(pThis);	}	root_s.add_line("Enemy_See_Me", seen_now);}
开发者ID:2asoft,项目名称:xray,代码行数:18,


示例20: Actor

void CUINewsWnd::LoadNews(){	UIScrollWnd->Clear();	if (Actor())	{		GAME_NEWS_VECTOR& news_vector = Actor()->game_news_registry->registry().objects();				// Показать только NEWS_TO_SHOW последних ньюсов		int currentNews = 0;		for (GAME_NEWS_VECTOR::reverse_iterator it = news_vector.rbegin(); it != news_vector.rend() && currentNews < NEWS_TO_SHOW ; ++it)		{			AddNewsItem(*it);			++currentNews;		}	}	m_flags.set(eNeedAdd,FALSE);}
开发者ID:OLR-xray,项目名称:XRay-NEW,代码行数:19,


示例21: InitShniaga

void CUIMMShniaga::InitShniaga(CUIXml& xml_doc, LPCSTR path){	string256 _path;	CUIXmlInit::InitWindow(xml_doc, path, 0, this);	strconcat				(sizeof(_path),_path,path,":shniaga:magnifire");	CUIXmlInit::InitStatic(xml_doc, _path,0,m_magnifier); 	m_mag_pos				= m_magnifier->GetWndPos().x;	strconcat				(sizeof(_path),_path,path,":shniaga");	CUIXmlInit::InitStatic(xml_doc, _path,0,m_shniaga);	strconcat				(sizeof(_path),_path,path,":buttons_region");	CUIXmlInit::InitScrollView(xml_doc, _path,0,m_view);	strconcat				(sizeof(_path),_path,path,":shniaga:magnifire:y_offset");	m_offset = xml_doc.ReadFlt(_path,0,0);	if (!g_pGameLevel || !g_pGameLevel->bReady) 	{				if (!*g_last_saved_game || !CSavedGameWrapper::valid_saved_game(g_last_saved_game))			CreateList		(m_buttons, xml_doc, "menu_main");		else			CreateList		(m_buttons, xml_doc, "menu_main_last_save");		CreateList			(m_buttons_new, xml_doc, "menu_new_game");	}	else {		if (GameID() == eGameIDSingle) {			VERIFY			(Actor());			if (Actor() && !Actor()->g_Alive())				CreateList	(m_buttons, xml_doc, "menu_main_single_dead");			else				CreateList	(m_buttons, xml_doc, "menu_main_single");		}		else			CreateList		(m_buttons, xml_doc, "menu_main_mm");	}    ShowMain				();	m_sound->Init(xml_doc, "menu_sound");	m_sound->music_Play();}
开发者ID:2asoft,项目名称:xray,代码行数:42,


示例22: VERIFY

bool _give_news	(LPCSTR text, LPCSTR texture_name, const Frect& tex_rect, int delay, int show_time){	GAME_NEWS_DATA				news_data;	news_data.news_text			= text;	if(show_time!=0)		news_data.show_time		= show_time;// override default	VERIFY(xr_strlen(texture_name)>0);	news_data.texture_name			= texture_name;	news_data.tex_rect				= tex_rect;	if(delay==0)		Actor()->AddGameNews(news_data);	else		Actor()->AddGameNews_deffered(news_data,delay);	return true;}
开发者ID:OLR-xray,项目名称:OLR-3.0,代码行数:20,


示例23: Actor

void RemoteNetworkView::CreateActor(IEventDataPtr pEventData) {	std::shared_ptr<EventData_CreateActor> pCastEventData = std::static_pointer_cast<EventData_CreateActor>(pEventData);	ActorId id = pCastEventData->VGetActorId();	Vec3 position = pCastEventData->VGetPosition();	Actor* actor = GCC_NEW Actor(id, position);	actor->SetName(pCastEventData->VGetActorName());	// With that Unity can safely call an Actor Name without messing up if there is simultaneous connection	actor->SetIp(pCastEventData->VGetIp());	std::shared_ptr<Actor> pActor(actor);	m_ActorManager->AddActor(pActor);}
开发者ID:amoscovitz,项目名称:samplegameserver,代码行数:11,


示例24: Actor

void CUICarBodyWnd::EatItem(){	CActor *pActor				= smart_cast<CActor*>(Level().CurrentEntity());	if(!pActor)					return;	NET_Packet					P;	CGameObject::u_EventGen		(P, GEG_PLAYER_ITEM_EAT, Actor()->ID());	P.w_u16						(CurrentIItem()->object().ID());	CGameObject::u_EventSend	(P);}
开发者ID:OLR-xray,项目名称:XRay-NEW,代码行数:11,



注:本文中的Actor函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ Actor_Query_Goal_Number函数代码示例
C++ Active函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。