Skip to content

2 views at once #10

Answered by player-03
NitroPlum asked this question in Q&A
Dec 18, 2023 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Absolutely!

var bullets = Echoes.getView(Projectile, Collider);
var enemies = Echoes.getView(Enemy, Collider);

for(bullet in bullets) {
  for(enemy in enemies) {
    // If the bullet is touching the enemy, kill it
  }
}

Alternatively, if you're in a System, you can call getLinkedView(Projectile, Collider), which works the same but shuts down the View if the system is deactivated.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@NitroPlum
Comment options

@player-03
Comment options

Answer selected by NitroPlum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants