MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / pullNewParticles

Method pullNewParticles

source/game/items/StarActiveItem.cpp:303–317  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

301}
302
303List<Particle> ActiveItem::pullNewParticles() {
304 // Same as pullNewAudios, we translate, rotate, and flip ourselves
305 List<Particle> result;
306 for (auto& particle : m_itemAnimatorDynamicTarget.pullNewParticles()) {
307 particle.position = owner()->position() + handPosition(particle.position);
308 particle.velocity = particle.velocity.rotate(m_armAngle.get());
309 if (owner()->facingDirection() == Direction::Left) {
310 particle.velocity[0] *= -1;
311 particle.flip = !particle.flip;
312 }
313 result.append(std::move(particle));
314 }
315 result.appendAll(m_scriptedAnimator.pullNewParticles());
316 return result;
317}
318
319Maybe<String> ActiveItem::cursor() const {
320 return m_cursor;

Callers

nothing calls this directly

Calls 6

appendAllMethod · 0.80
positionMethod · 0.45
rotateMethod · 0.45
getMethod · 0.45
facingDirectionMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected