bool test(entity const & e) const { // variadic logical OR return concept_or( (e.id() == IDList)... ); }
bool test(entity const & e) const { if (!e || !e.has<position>()) return false; return e.get<position>() == m_pos && m_ent.id() != e.id() && (!DoColl || (e.has(collides_) && e(collides_, m_ent))); }
EntityAtPosImpl(entity const & e) { if (Times != -1) { REQUIRE_CONCEPT(e, EntityHas<position, direction>); m_pos = move( e.get<position>() , turn_left(e.get<direction>(), static_cast<unsigned>(Times)) , 1 ); } else { REQUIRE_CONCEPT(e, EntityHas<position>); m_pos = e.get<position>(); } m_ent = entity(e.id(), m_pos); }
bool draw_entity_at(sf::RenderWindow & to, entity const & e, position at) { // Don't draw if the entity is dead if (!e) return false; tile_id tid; if (e.has<tile_id>()) { tid = e.get<tile_id>(); } else { tid = static_cast<tile_id>(e.id()); } if (e.has<direction>()){ tid = directional_tile_id(tid, e.get<direction>()); } draw_tile_at(to, tid, at); return true; }
bool test(entity const & e) const { return concept_and( Querys(e.id())... ); }
bool test(entity const & e) const { return concept_and( (e.id() != Ids)... ); }
bool test(entity const & e) const { return concept_or( (e.id() == Ids)... ); }
bool test(entity const & e) const { return same_position(e, m_ent) && e.id() == ID; }
OnEntity(entity const & e) { m_ent = entity(e.id(), e.get<position>()); }
bool test(entity const & e) const { return e.id() == m_id; }
bool test(entity const & e) const { return !concept_or( Querys(e.id())... ); }
bool at_location(entity_locator loc, entity const & e) { return e && e.id() == loc.id && e.get<position>() == loc.pos; }