Understanding the concept of SpriteKit Nodes
<p>So I'm very new to SpriteKit and Swift, and I don't really understand the concept behind nodes (or really anything in sprite-kit for the matter). I'm requesting you explain the concept of nodes to me.</p>

<p>I'm much more used to having a different instance of a variable for each node (such as making an array), which allows me to very specifically reference any single node. However in sprite kit this doesn't seem to be the case since you simply just make it once and call multiple instances of it with addChild. (Way better than what I've been doing...)</p>

<p>This kinda boggles me because I mainly don't understand how I could test a scenario or something for these or reference one individually. For example, I'm trying to get an object to be removed from the scene with <code>removeFromParent()</code>, but I don't how to implement something like:</p>

<pre><code>if(enemy.position.x == 0)
{
SKAction.removeFromParent()
}
</code></pre>

<p>Before I would setup a for loop that checks every single enemy but this is SUPER inefficient. I think I would do this in the update method provided by the physics engine, but like I said I have no idea how to call it.</p>

<p>So my question is basically to have you explain to me the concept of what's going on here. Pretend I have absolutely no knowledge of this type of programming (which I pretty much don't) and if you could break it down to me like I'm five that would be great :D!</p>

<p>Thanks!</p>