当前位置: 首页>>代码示例>>C++>>正文


C++ CAI_Stalker类代码示例

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


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

示例1: ai

IC	T	*CScriptGameObject::action_planner()
{
	CAI_Stalker				*manager = smart_cast<CAI_Stalker*>(&object());
	if (!manager)
		ai().script_engine().script_log				(ScriptStorage::eLuaMessageTypeError,"CAI_Stalker : cannot access class member action_planner!");
	return					(&manager->brain());
}
开发者ID:OLR-xray,项目名称:OLR-3.0,代码行数:7,代码来源:script_game_object_use.cpp

示例2: ai

bool CScriptGameObject::suitable_smart_cover					(CScriptGameObject* object)
{
	if (!object) {
		ai().script_engine().script_log	(ScriptStorage::eLuaMessageTypeError, "CAI_Stalker::suitable_smart_cover null smart cover specified!");
		return							(false);
	}

	CAI_Stalker							*stalker = smart_cast<CAI_Stalker*>(&this->object());
	if (!stalker) {
		ai().script_engine().script_log	(ScriptStorage::eLuaMessageTypeError, "CAI_Stalker : cannot access class member suitable_smart_cover!");
		return							(false);
	}

	smart_cover::object const* const	smart_object = smart_cast<smart_cover::object const*>(&object->object());
	if (!smart_object) {
		ai().script_engine().script_log	(ScriptStorage::eLuaMessageTypeError, "CAI_Stalker : suitable_smart_cover: passed non-smart_cover object!");
		return							(false);
	}

	smart_cover::cover const& cover		= smart_object->cover();
	if (!cover.is_combat_cover())
		return							(true);

	CInventoryItem const* inventory_item= stalker->inventory().ActiveItem();
	if (inventory_item)
		return							(inventory_item->GetSlot() == 2);

	CInventoryItem const* best_weapon	= stalker->best_weapon();
	if (!best_weapon)
		return							(false);

	return								(best_weapon->GetSlot() == 2);
}
开发者ID:2asoft,项目名称:xray,代码行数:33,代码来源:script_game_object_inventory_owner.cpp

示例3: script_play_callback

void CStalkerAnimationManager::script_play_callback(CBlend *blend)
{
	CAI_Stalker					*object = (CAI_Stalker*)blend->CallbackParam;
	VERIFY						(object);
	
	CStalkerAnimationManager	&animation_manager = object->animation();
	CStalkerAnimationPair		&pair = animation_manager.script();
	const SCRIPT_ANIMATIONS		&animations = animation_manager.script_animations();

#if 0
	Msg							(
		"%6d Script callback [%s]",
		Device.dwTimeGlobal,
		animations.empty()
		?
		"unknown"
		:
		animation_manager.m_skeleton_animated->LL_MotionDefName_dbg(animations.front().animation())
	);
#endif

	if	(
			pair.animation() && 
			!animations.empty() && 
			(pair.animation() == animations.front().animation())
		)
		animation_manager.pop_script_animation();

	animation_manager.m_call_script_callback	= true;

	pair.on_animation_end		();
}
开发者ID:2asoft,项目名称:xray,代码行数:32,代码来源:stalker_animation_script.cpp

示例4:

void CScriptGameObject::set_sight		(const CMemoryInfo *memory_object, bool	torso_look)
{
	CAI_Stalker					*stalker = smart_cast<CAI_Stalker*>(&object());
	if (!stalker)
		ai().script_engine().script_log					(ScriptStorage::eLuaMessageTypeError,"CSightManager : cannot access class member set_sight!");
	else
		stalker->sight().setup	(memory_object,torso_look);
}
开发者ID:,项目名称:,代码行数:8,代码来源:

示例5: ai

void CScriptGameObject::set_patrol_path		(LPCSTR path_name, const PatrolPathManager::EPatrolStartType patrol_start_type, const PatrolPathManager::EPatrolRouteType patrol_route_type, bool random)
{
	CAI_Stalker					*stalker = smart_cast<CAI_Stalker*>(&object());
	if (!stalker)
		ai().script_engine().script_log					(ScriptStorage::eLuaMessageTypeError,"CAI_Stalker : cannot access class member movement!");
	else
		stalker->movement().patrol().set_path		(path_name,patrol_start_type,patrol_route_type,random);
}
开发者ID:,项目名称:,代码行数:8,代码来源:

示例6:

void CStalkerAnimationManager::legs_play_callback			(CBlend *blend)
{
	CAI_Stalker					*object = (CAI_Stalker*)blend->CallbackParam;
	VERIFY						(object);

	CStalkerAnimationPair		&pair = object->animation().legs();
	pair.on_animation_end		();
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:8,代码来源:stalker_animation_legs.cpp

示例7: ai

float CScriptGameObject::max_ignore_monster_distance	() const
{
	CAI_Stalker			*stalker = smart_cast<CAI_Stalker*>(&object());
	if (!stalker) {
		ai().script_engine().script_log		(ScriptStorage::eLuaMessageTypeError,"CAI_Stalker : cannot access class member max_ignore_monster_distance!");
		return			(0.f);
	}
	return				(stalker->memory().enemy().max_ignore_monster_distance());
}
开发者ID:OLR-xray,项目名称:OLR-3.0,代码行数:9,代码来源:script_game_object2.cpp

示例8: ai

LPCSTR CScriptGameObject::get_dest_smart_cover_name		()
{
	CAI_Stalker*						stalker = smart_cast<CAI_Stalker*>(&object());
	if (!stalker) {
		ai().script_engine().script_log	(ScriptStorage::eLuaMessageTypeError,"CAI_Stalker : cannot access class member get_dest_smart_cover!");
		return							(0);
	}

	return								(stalker->movement().target_params().cover_id().c_str());
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:10,代码来源:script_game_object_smart_covers.cpp


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