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


C++ team::recall_list方法代码示例

本文整理汇总了C++中team::recall_list方法的典型用法代码示例。如果您正苦于以下问题:C++ team::recall_list方法的具体用法?C++ team::recall_list怎么用?C++ team::recall_list使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在team的用法示例。


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

示例1: test_available_for_recalling

bool recall_result::test_available_for_recalling(const team &my_team, bool)
{
	const std::vector<unit>::const_iterator rec = std::find_if(my_team.recall_list().begin(), my_team.recall_list().end(), boost::bind(&unit::matches_id, _1, unit_id_));
	if (rec == my_team.recall_list().end()) {
		set_error(E_NOT_AVAILABLE_FOR_RECALLING);
		return false;
	}
	return true;
}
开发者ID:Yossarian,项目名称:WesnothAddonServer,代码行数:9,代码来源:actions.cpp

示例2: get_recall_unit

unit_const_ptr recall_result::get_recall_unit(const team &my_team)
{
	unit_const_ptr rec = my_team.recall_list().find_if_matches_id(unit_id_);
	if (!rec) {
		set_error(E_NOT_AVAILABLE_FOR_RECALLING);
	}
	return rec;
}
开发者ID:Wedge009,项目名称:wesnoth,代码行数:8,代码来源:actions.cpp

示例3:

carryover::carryover(const team& t, const int gold, const bool add)
		: add_ (add)
		, color_(t.color())
		, current_player_(t.current_player())
		, gold_(gold)
		, name_(t.name())
		, previous_recruits_(t.recruits())
		, recall_list_(t.recall_list())
		, save_id_(t.save_id())
		{}
开发者ID:Coffee--,项目名称:wesnoth-old,代码行数:10,代码来源:gamestatus.cpp

示例4:

carryover::carryover(const team& t, const int gold, const bool add)
		: add_ (add)
		, current_player_(t.current_player())
		, gold_(gold)
		, previous_recruits_(t.recruits())
		, recall_list_()
		, save_id_(t.save_id())
		, variables_(t.variables())
{
	for(const unit_const_ptr & u : t.recall_list()) {
		recall_list_.emplace_back();
		u->write(recall_list_.back());
	}
}
开发者ID:GregoryLundberg,项目名称:wesnoth,代码行数:14,代码来源:carryover.cpp

示例5:

carryover::carryover(const team& t, const int gold, const bool add)
		: add_ (add)
		, color_(t.color())
		, current_player_(t.current_player())
		, gold_(gold)
		, name_(t.name())
		, previous_recruits_(t.recruits())
		, recall_list_()
		, save_id_(t.save_id())
{
	BOOST_FOREACH(const unit_const_ptr & u, t.recall_list()) {
		recall_list_.push_back(config());
		u->write(recall_list_.back());
	}
}
开发者ID:8680-wesnoth,项目名称:wesnoth-fork-old,代码行数:15,代码来源:carryover.cpp


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